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 2000 Forums
 Transact-SQL (2000)
 Simple count problem

Author  Topic 

SirFang
Starting Member

6 Posts

Posted - 2005-06-17 : 12:12:53
How can I count the number of records that have a date higher than what I input?

SELECT COUNT(PPWEDate) AS Expr1
FROM ronros.TechWorkOrders
HAVING (PPWEDate > 12 / 31 / 04)

This is giving me an error but Ihope it conveys what I am trying to do.

X002548
Not Just a Number

15586 Posts

Posted - 2005-06-17 : 12:16:04
SELECT COUNT(*) AS Expr1
FROM ronros.TechWorkOrders
WHERE PPWEDate > '12/31/04'

Brett

8-)

Hint: Want your questions answered fast? Follow the direction in this link
http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx
Go to Top of Page

SirFang
Starting Member

6 Posts

Posted - 2005-06-17 : 12:17:58
Thanks
Go to Top of Page
   

- Advertisement -