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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

"newbie" ... variable date in query

Status
Not open for further replies.

MizzGail

Technical User
Dec 4, 2002
11
US
I am using informix with BaanIV.
I know how to do simple queries.
I need to pull the data from a table based on date. I know how to do this hard coded, but I need to be able to run this query from our crontab on unix and look for all changes for today and yesterday.

How do I get this query to pickup todays date and yesterdays from the system?

select * from price-table
where effdate between yesterday and today
 
Hi,

In the simplest form; you may ask the database server itself to figure out the dates. e.g.

select * from price-table
where effdate between today-1 and today

Regards
Shriyan
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top