Well I had some fun writing this cron , easy enough with all the help you guys gave me...
Just some interesting info I want to share, maybe someone came across this and can also
give some thoughts...
What the Oracle guys found was that some of the fields were blank even though the fields
were configured as not nullable.
I found that where this is the case, the users entered a blank space which is then
counted as a character and is thus not null.
This is causing all kinds of havoc for them as Oracle apparently still sees this as
From: Nicola Salvemini [mailto:nicolasalvemini@stripped]
Sent: 07 January 2010 3:45 PM
To: sureshkumarilu@stripped; Mikhail Berman; machiel.richards
Subject: Re: table export in cron
----- machiel.richards <machiel.richards@stripped> wrote
> How can we do this when running in a cron script?
You can use following command in a shell script running from cron:
echo "select * from <table> into outfile '/path/to/output/file' fields terminated
by '|';" | mysql --user=<youruser> --password=<yourpassword>