Hi All

        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 nulls.

Regards


-----Original Message-----
From: Nicola Salvemini [mailto:nicolasalvem...@yahoo.it] 
Sent: 07 January 2010 3:45 PM
To: sureshkumar...@gmail.com; Mikhail Berman; machiel.richards
Cc: mysql@lists.mysql.com
Subject: Re: table export in cron

----- machiel.richards <machiel.richa...@gmail.com> wrote
>
>                 How can we do this when running in a cron script? 
>

Hi!

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> 
<yourdatabase>;

Bye!


      


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/mysql?unsub=arch...@jab.org

Reply via email to