Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

get count of the records within specific dates Expand / Collapse
Author
Message
Posted Thursday, March 4, 2010 7:27 PM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Wednesday, November 5, 2014 12:30 PM
Points: 141, Visits: 545
i used this script .. but not works
select Count(*) , date_Col
from table
Where date_col between '1/1/2000' and '1/2/2003'

Error : group by need to be used ..

changed to

select Count(*) , date_Col
from table
Where date_col between '1/1/2000' and '1/2/2003'
group by date_col


not working ..


please tell me ..How to Get the number of records and date colum ..
between specific columns
\
Post #877335
Posted Thursday, March 4, 2010 8:10 PM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Wednesday, November 5, 2014 12:30 PM
Points: 141, Visits: 545
I got it .. finally.. thanks
Post #877344
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse