MySQL Lists are EOL. Please join:

List:General Discussion« Previous MessageNext Message »
From:Don Read Date:March 16 2003 8:51pm
Subject:Re: INTO LOCAL OUTFILE?
View as plain text  
On 16-Mar-2003 Tim Johnson wrote:
> Hi Paul:
> * Paul DuBois <paul@stripped> [030316 09:59]:
>> At 9:14 -0900 3/16/03, Tim Johnson wrote:
>> >Hello All:
>> >    I am using Ver 11.15 Distrib 3.23.41, for redhat-linux-gnu (i386)
>> >
>> >    I believe that INTO LOCAL OUTFILE is not implemented, but
>> >    all the same, I would like to save a selection set into
>> >    a local output (text) file. Can someone suggest a way to
>> >    use mysqldump to do the same (or any other strategy).
>> >
>> >    I've tried using the --tab option but get am getting
>> >    Errcode: 13
>> 
>> There is no analog to INTO LOCAL OUTFILE.  You can save the output
>> of a query executed in mysql to a file, which will give you a
>> tab-delimited
>> file.  In some cases, that may be sufficient.
>> 
>> mysql -e "select * from tbl_name" db_name > output
>  
>   Paul, that works just fine. I note that column names
>   are inserted as the first line. Is there a way to eliminate
>   that? If not, that is just fine.
> 

mysql -N -e "select * from tbl_name" db_name > output

Regards,
-- 
Don Read                                       dread@stripped
-- It's always darkest before the dawn. So if you are going to 
   steal the neighbor's newspaper, that's the time to do it.
                            (53kr33t w0rdz: sql table query)
Thread
INTO LOCAL OUTFILE?Tim Johnson16 Mar
  • Re: INTO LOCAL OUTFILE?Paul DuBois16 Mar
    • Re: INTO LOCAL OUTFILE?Tim Johnson16 Mar
      • Re: INTO LOCAL OUTFILE?Paul DuBois16 Mar
      • Re: INTO LOCAL OUTFILE?Don Read16 Mar