Site Sponsored By: SQLDSC - SQL Server Desired State Configuration
Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
I'm trying to pull records that were entered 7 days prior to today. The table is orders and the column is opendate. I tried the below but as you know, it didn't work. Any help would be appreciatedselect orderno, opendatefrom orderswhere opendate <= datesub(d,7,getdate())
------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/
nevermore507
Starting Member
2 Posts
Posted - 2012-04-05 : 11:37:06
Thank you!
visakh16
Very Important crosS Applying yaK Herder
52326 Posts
Posted - 2012-04-05 : 11:44:39
welcome------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/