Results 1 to 3 of 3
  1. #1
    Join Date
    Nov 2004
    Posts
    14

    Unanswered: 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

  2. #2
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Provided Answers: 54
    I'm not where I can test this, but could you use:
    Code:
    insert into mytable (id, text) values (1, 'blabla
    moreblabla');
    -PatP

  3. #3
    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •