Re: load / unload
Posted in 2000
Alec
Try this:
#!/bin/ksh
(
echo "load from 012600am.customer insert into customer" | dbaccess yourdb
echo "unload to 012600am.out select * from customer" | dbaccess yourdb
) > /export/home/alec/loadreport.out 2>&1
HTH
Sujit
biggiealec@my-deja.com on 01/26/2000 01:59:57 PM
Please respond to biggiealec@my-deja.com
To: informix-list@iiug.org
cc:
Subject: load / unload
I've got an ftp push/pull feed with files, and I need a way to set a
cron job to be able to run a load and unload statement once a day. The
cron job isn't my problem, it's passing the sql statement to the
database via commandline. I need to pass something like load from
012600am.customer insert into customer and then run unload to
012600am.out via a crontab entry, so a program to submit a sql query to
a database from command-line is all I really need.
Thanks,
Alec
Sent via Deja.com http://www.deja.com/
Before you buy.