Skip to Main Content

SQL Developer

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Change a manually entered date to a variable

2996759Jul 22 2015 — edited Jul 23 2015

First off, I apologize this is literally my first time dealing with SQL and I just had this placed in my lap, so if I word something in a way that doesn't make sense or ask an ignorant question then forgive me.

I need to change a line of code in this query from a date you have to manually enter every day, into a date variable that will set the date for the previous day, like Today - 1.

where statuscode = 'WW' and statusdatetime like '2015-07-21%'

So when I run this query it'll automatically assign yesterday's date.

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 20 2015
Added on Jul 22 2015
3 comments
623 views