Results 1 to 4 of 4
  1. #1
    Join Date
    Dec 2003
    Posts
    41

    Unanswered: carriage return inside a field of text data type?

    how can i insert a carriage return when i update the field?

    say i want to put the following inside a field:
    firstline
    secondline

    how can i update/insert a column to have a return carriage inside it?
    UPDATE table SET column = 'firstline secondline'

    the reason i want this is because when using a program (Solomon, by microsoft, purchasing software) to grab a field out of the database and when it displays that field in the programs textbox, i want it to be displayed on two separate lines

    i tried doing
    UPDATE table SET column = 'firstline' + char(13) 'secondline'

    but when in the solomon program, it displays an ascii character between firstline and secondline like: firstline||secondline

    thanks

  2. #2
    Join Date
    Nov 2004
    Posts
    108

    char(10)

    try char(10) instead
    or the combination of the two characters
    to err is human ; to really mess things up requires a computer

  3. #3
    Join Date
    Dec 2003
    Posts
    41
    ive actually tried them both

    edit: just tried using char(13) + char(10) and it works! thanks!
    Last edited by Chauzer; 11-24-04 at 15:30.

  4. #4
    Join Date
    Nov 2004
    Posts
    108

    A candle loses nothing by lighting another candle

    you welcome
    to err is human ; to really mess things up requires a computer

Posting Permissions

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