jaymz69
asked on
Get SYSdate in SQL Server 2008 r2
I want to get t he sysdat and subtract 6 days from it
then put that date into a variable to use in my SELECT
so I only get order < Sdate
then put that date into a variable to use in my SELECT
so I only get order < Sdate
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Even better if it can be done within the SELECT. I am going off my experance in another program, VFP
ASKER
Thanks
declare @sdate datetime
set @sdate = DATEADD(DD, -6, GETDATE())