If I understand your question correctly, you're wanting to grab the
records where the date is greater than or equal to a date plus 7 days.
If so, then:

SELECT * FROM myTable WHERE date_field >= CAST('2003-10-19' AS DATETIME)
+ 7 

Or you can use the DATEADD function:

SELECT * FROM myTable WHERE date_field >= DATEADD(DAY, 7, '2003-10-19')


Dan
-----Original Message-----
From: DevList [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, October 21, 2003 4:49 PM
To: mySQL Mailing List
Subject: mysql to mssql query

Does anybody know the equivalent of this query in mssql:

SELECT * FROM myTable WHERE date_field >= DATE_SUB('2003-10-19',
INTERVAL 7
DAY);

For this project we are pulling records off a MS SQL db, and I need to
figure a way to return all records for the week.

Any help is appreciated.




-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:
http://lists.mysql.com/[EMAIL PROTECTED]


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to