Thursday, January 26, 2012

SQL Retrieve/Count Record on a previous date

1:  -- a simple demonstration of sql where you can   
2:  -- retrieve a record from a previous date  
3:  select sum(data_gathered) as data_gatherer,   
4:      name from tblctivity  
5:       where name like '%prgGatherer1.xml%'  
6:         and (date(rec_date) = (CURDATE() - 1));  

0 comments:

Post a Comment