shell-script-pt
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [shell-script] Re: Script mysql + CSV


From: Eliel
Subject: Re: [shell-script] Re: Script mysql + CSV
Date: Wed, 23 Oct 2013 14:38:09 -0200

Continua no MAN
 --column-names

           Write column names in results.

Estou sem acesso direto, mas
http://manpages.ubuntu.com/manpages/lucid/man1/mysql.1.html
 
=)

On Wed, Oct 23, 2013 at 1:55 PM, Julian <address@hidden> wrote:
 

-N, --skip-column-names Don't write column names in results.

--- Em address@hidden, Eliel <slayer_r0x@...> escreveu


>
> Estou sem acesso ao client..
> Mas pra pegar o cabecalho, o MrBits falou no comeco que voce precisa usar o
> parametro -N
> man mysql ai
> e acredito que seja mysql -N -u$user .......
>
> On Wed, Oct 23, 2013 at 12:19 PM, Julian <jul1ansoares@...> wrote:
>
> > **

> >
> >
> > Fazendo direto rola :
> > mysql> select * from article limit 0,1 INTO OUTFILE '/tmp/sac1.csv' FIELDS
> > TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"' LINES TERMINATED BY '\n';
> > Query OK, 1 row affected (0.00 sec)
> >
> > porém ele não pega cabeçalho no arquivo CSV.
> >
> > --- Em address@hidden, "Julian" <jul1ansoares@>
> > escreveu
> >
> > >
> > > Aos consultores então, ve se isso faz parte de uma ajuda ou consultoria :
> > > teoricamente está assim :
> > >
> > > mysql -u$user -p$pass -D$banco -e select * from ticket limit 0,10 INTO
> > OUTFILE '/tmp/sac1.csv' FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"'
> > LINES TERMINATED BY '\n';
> > >
> > > só que não rolou, desse jeito
> > >
> >
> >
> >
>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]