Re: how to escape new lines using select * into outfile
- Date: Tue, 13 May 2008 12:23:02 -0700 (PDT)
- From: Saravanan <suzuki_babu@xxxxxxxxx>
- Subject: Re: how to escape new lines using select * into outfile
thanks velen. But I want to escape the newlines in the fields. It is annoying and new lines moves the values in separate line of excel sheet.
Thanks,
Saravanan
--- On Wed, 5/14/08, Velen <velen@xxxxxxxxxx> wrote:
> From: Velen <velen@xxxxxxxxxx>
> Subject: Re: how to escape new lines using select * into outfile
> To: suzuki_babu@xxxxxxxxx
> Cc: mysql@xxxxxxxxxxxxxxx
> Date: Wednesday, May 14, 2008, 1:35 AM
> Try using:
>
> select * into outfile 'filename.csv' fields
> enclosed by '"' terminated by
> ',' lines terminated by '\n' from table
>
> Regards,
>
> Velen
>
>
> ----- Original Message -----
> From: "Saravanan" <suzuki_babu@xxxxxxxxx>
> To: "mysql" <mysql@xxxxxxxxxxxxxxx>
> Sent: Tuesday, May 13, 2008 9:26 PM
> Subject: how to escape new lines using select * into
> outfile
>
>
> > Hi all,
> >
> > I want to export the values based on the condition. I
> export them as csv.
> >
> > select * into outfile 'filename.csv' from
> table;
> >
> > the problem is one field in table has many lines,
> means with \n. I
> couldn't import the values into the xls sheet.
> >
> > any ideas how to escape the new line characters?
> >
> > Thanks,
> > Saravanan
> >
> >
> >
> >
> > --
> > MySQL General Mailing List
> > For list archives: http://lists.mysql.com/mysql
> > To unsubscribe:
> http://lists.mysql.com/mysql?unsub=velen@xxxxxxxxxx
> >
> >
>
>
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:
> http://lists.mysql.com/mysql?unsub=suzuki_babu@xxxxxxxxx
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=royale@xxxxxxxxxx