Pass Date variable in cron job
Posted in 1995
> 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.
Sometimes we pass variables into SQL by calling it command-line fashion from
a shell script. It looks something like this:
$ echo "select * from tabname where field = $date" | isql dbnameThere are a couple of variations on this theme, but that's the general idea.
Good luck,
__________________________________________________________________
| Clem Akins Standard Disclaimers Apply |
|Reynolds Metals Co, Alloys Plant "Climb High, Cave Deep!" |
| Muscle Shoals, Alabama USA cwakins@leia.alloys.rmc.com |
|________________________________________________________________|