#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2003
    Posts
    12
    Rep Power
    0

    Replace Line Breaks?


    I imported some data that includes a bunch of '[CR-LF]' strings where there should be line breaks. I know I can just use

    UPDATE table SET column = REPLACE(column, '[CR-LF]', <something>);

    To get rid of them, but what is the syntax to insert a line break??

    TIA.
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Frequenter (2500 - 2999 posts)

    Join Date
    Oct 2003
    Location
    Germany
    Posts
    2,777
    Rep Power
    348
    UPDATE table SET column = REPLACE(column, '[CR-LF]', chr(13) );
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2003
    Posts
    12
    Rep Power
    0
    Thanks! It turns out I actually needed CRLFs in the data, so I used:

    UPDATE table SET column = REPLACE(column, '[CR-LF]', chr(13)||chr(10) );

IMN logo majestic logo threadwatch logo seochat tools logo