Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Impromptu 5

Status
Not open for further replies.

TaGY2K

Technical User
Feb 12, 2007
2
CA
Hi, I have create a query for a report and the thing is that I want it to put on a schedular.

What I need is to run a report on a daily basis and pull the report of the yesterday's day prices instead of today but the report runs one day ahead. I have try Last Price=day(now())-1 and still doesn't work
 
day(now())-1 will net you the value of 12 for any 13th of the month. So, the expression will net you :
Last Price = 12
Surely you are after another sort of condition?

Ties Blom

 
what I want is to run an report with today's date but will pull yesterday price date .. ie

when I have the schedular to run on Feb 13 and pull this date:
MSFT $48 Feb 12,2007
 
getdate()-1 or sysdate-1 or current_date-1

All depending on the RDBMS used

Ties Blom

 
Note that you might need to strip out the time component of either or both fields.

soi la, soi carré
 
Yep, true for both SQL Server and Oracle. Well,that is just a matter of looking up syntax

Ties Blom

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top