?
Solved

Select Where Date Is Yesterday

Posted on 2006-07-21
1
Medium Priority
?
627 Views
Last Modified: 2010-08-05
How do I construct a SQL query where I select all items where a date field is yesterday?
0
Comment
Question by:E-Risk
1 Comment
 
LVL 75

Accepted Solution

by:
Aneesh Retnakaran earned 200 total points
ID: 17158723
You can use  " GETDATE() -1 " 

or like this


SELECT * from yourTable
WHERE select Convert (varchar(8),urDateColumn,112)   = select Convert (varchar(8),getdate()-1,112)
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I have a large data set and a SSIS package. How can I load this file in multi threading?
This month, Experts Exchange sat down with resident SQL expert, Jim Horn, for an in-depth look into the makings of a successful career in SQL.
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
Via a live example, show how to set up a backup for SQL Server using a Maintenance Plan and how to schedule the job into SQL Server Agent.
Suggested Courses

840 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question