If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > ANSI SQL > Insert chars with line feed

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 11-18-04, 11:14
Markus123 Markus123 is offline
Registered User
 
Join Date: Nov 2004
Posts: 14
Insert chars with line feed

Hi,

my table looks like:

MyTable:
id: integer
text: varchar(230)

I want to insert new data, which contains a carriage return (#13) or line feed (#10). So I need something like this:

insert into mytable (id, text) values (1, 'blabla#13#10moreblabla');

I'm using MySQL 4.1 and I've tried many things, but nothing helped

Thanks for your help,
Markus
Reply With Quote
  #2 (permalink)  
Old 11-18-04, 12:14
Pat Phelan Pat Phelan is offline
Resident Curmudgeon
 
Join Date: Feb 2004
Location: In front of the computer
Posts: 12,605
I'm not where I can test this, but could you use:
Code:
insert into mytable (id, text) values (1, 'blabla
moreblabla');
-PatP
Reply With Quote
  #3 (permalink)  
Old 11-19-04, 02:21
Markus123 Markus123 is offline
Registered User
 
Join Date: Nov 2004
Posts: 14
Hi Pat,

thanks for your help. But sorry, this doesn't seem to work. I found some hints, using

Code:
insert into mytable (id, text) values (1, concat(concat('blabla', char(#13)), 'moreblabla'))
but this also doesn't really works

Greetings,
Markus
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On