Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7189595
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T19:20:08+00:00 2026-05-28T19:20:08+00:00

How can I read with SQL COUNT(*) the Number of entries Hi, I don’t

  • 0

How can I read with SQL COUNT(*) the Number of entries

Hi,
I don’t know to read the number of entries in a table. (I would like to use asp:Repeader)

sql = "SELECT COUNT(*) FROM Table";

<asp:Repeater id="Repeater01" runat="server">
 <ItemTemplate>
  <%# DataBinder.Eval(Container.DataItem, "????????") %>
 </ItemTemplate>
</asp:Repeater>

What is the ???? Statement?
Thanks.

Edit: This is my SQL-Statement:

select t.tip_adi, count(oda.oda_tip_id) from oteldb.tip t 
left join (select oda_tip_id from oteldb.oda o 
       where not exists (
              select null from oteldb.rezervasyon r 
              where r.rezervasyon_oda_id = o.oda_id 
              and r.rezervasyon_gt <= '2012-01-22' 
              and '2012-01-03' <= r.rezervasyon_c
       ) ) oda on oda.oda_tip_id = t.tip_id 
group by t.tip_adi
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T19:20:09+00:00Added an answer on May 28, 2026 at 7:20 pm

    You need to alias the COUNT(*), like this:

    sql = "SELECT COUNT(*) AS MyCount FROM Table";

    Now you have a defined column name you can begin to use as MyCount.

    So now you can do:

    <%# DataBinder.Eval(Container.DataItem, "MyCount") %>
    

    Based on your comment your query would become this:

    select t.tip_adi, count(oda.oda_tip_id) AS MyCount from oteldb.tip t left join (select oda_tip_id from oteldb.oda o where not exists (select null from oteldb.rezervasyon r where r.rezervasyon_oda_id = o.oda_id and r.rezervasyon_gt <= '2012-01-22' and '2012-01-03' <= r.rezervasyon_ct) ) oda on oda.oda_tip_id = t.tip_id group by t.tip_adi

    Notice the “MyCount”. Now you can use what I posted above to bind that value.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

anyone know how can i do counting if in SQL alchemy like COUN(IF(table_row =
I have a SQL Server database which I can read from, is there a
How can I read the value of a system environment variable in a T-SQL
I can read settings like this, for example: final String mytest = System.getString(this.getContentResolver(), System.AIRPLANE_MODE_ON);
In C++ I Can Read The MAC Address Of The NIC and Use It
Can someone tell me how I can combine the two SQL statements that count
How can run sql query CoreData similar this: SELECT COUNT(*) FROM headphones WHERE id
I'm coding a tool to count all entries in a table. My question is,
currently I use DataSet to read data from ADO.NET SQL provider, but I read
First, Let me apologize as I know NOTHING about ruby. I can read through

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.