Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Getting the correct count 1

Status
Not open for further replies.

Gatorajc

MIS
Mar 1, 2002
423
US
I want to get the count of how many different dates there are in a table. How would I write that query?
I have this right now

Select Count (date) Total
From PRONOTES

But as you can see this just give me the total of dates. I want to know how many different dates are in the DB. Is there a distinct function or do I have to come up with a where statement.

Thanks in advance.
 
After some research I was able to get this

Select Date, Count (date) Total
From PRONOTES
group by date

which gives me this
Date Total
1900-01-01 00:00:00.000 1

and so on and so on

(148 row(s) affected)

how do I get it to just display the count for 148. I need it to create a dynamic array in ASP.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top