Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 Select count of daily inserts

Author  Topic 

jgonzalez14
Yak Posting Veteran

73 Posts

Posted - 2010-03-23 : 09:55:45
I am trying to select the number of entrys per day between a time period, I can't seem to figure it out. Can anyone help?


SELECT [id]
,[fname]
,[email]
,[fname2]
,[email2]
,[comment]
,[ip]
,[date]
FROM [Recommend]
WHERE date BETWEEN '3/15/2010' AND '3/22/2010'

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2010-03-23 : 10:01:38
Is this?


SELECT date,count(*),
FROM [Recommend]
WHERE date BETWEEN '2010-03-15' AND '2010-03-22'
GROUP BY date


Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

vaibhavktiwari83
Aged Yak Warrior

843 Posts

Posted - 2010-03-23 : 10:02:26
Whats the issue with this query?

Vaibhav T
Go to Top of Page

jgonzalez14
Yak Posting Veteran

73 Posts

Posted - 2010-03-23 : 10:13:23
Worked perfect thank you
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2010-03-23 : 10:21:28
quote:
Originally posted by jgonzalez14

Worked perfect thank you


You are welcome

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -