Re: Pass Date variable in cron job
Posted in 1995
In <1995Jul25.183745.55119@msuvx2.memphis.edu> tangh@cc.memphis.edu writes:
>Hello, everyone. I need to run a job everyday automatically. In the SQL
>procedure, I have date = "07/11/95" to run for july 11 report. I have been
>trying to pass the data to the SQL program and let it run automatically . I
>created a CRON job, and couldn't find right sytax to pass the date variable.
>Could some one help with this question. I am using INFORMIX online, dbaccess
>to run the sql program. Thanks. Tina.
I always did it in the script like this:
SQL << EOF
select x
where
x < `date +%m%d%y`
and
x > `01/01/01
intoEOF
etc .......
The quotes are reverse quotes located under the tilda on most keyboards.
--
Hal Cooper - hal@teleport.com| The opinions and statements contained in this
MIS Manager | posting are the sole responsibility of the
Paper Products Marketing | author and have not in any way been reviewed
_____________________________| or approved by my employer.