Something like
Select * from mytableostuff
Where salesdate > 'DATEADD(day, -5, getdate())'
Gl,
Alexander Sicular
Chief Technology Architect
Neurological Institute of New York
Columbia University
as867 [at] columbia {dot} edu
|-----Original Message-----
|From: han peng [mailto:[EMAIL PROTECTED]]
|Sent: Thursday, March 21, 2002 11:49 PM
|To: CF-Talk
|Subject: how to retrieving data by age of record in MSSQL
|
|
|hihi..all gurus.. i know this is not appropriate here... sorry
|to bother u all.... i need to write a query to retrieve
|existing records by age of the records..
|
|
|eg. user want to see Sales orders that are 5 yrs old..
|
|so i need to write a query to retrieve from sales table..
|where theres a orderdate column int it.. datatype is datetime.
|
|so how am i going to write the query in mssql..??
| oracle can use trunc() .. but mssql dont hav that... :(
|
|help help..
|
|hanpeng
|
|
______________________________________________________________________
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists