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.
Hi,I have a log table that has datetime column (e.g. '2012-01-01 08:00:00).I would like to retrive just the records of "yesterday"What is the best way to compare between a getutcdate()-1 and the column that I have and to get only the records for yesterday.Thanks.
------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/
Works good ! Thanks!
visakh16
Very Important crosS Applying yaK Herder
52326 Posts
Posted - 2012-01-16 : 05:29:56
welcome------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/