Results 1 to 4 of 4
  1. #1
    Join Date
    Jun 2006

    Unanswered: How to insert \n into TEXT column

    I have a text column thatI want to preload with some text that contains EOLN (\n) charcters.

    I know I need to use "LOAD" to load the text column, but regardless of what I try, I can't get the \n character loaded. I even insert it programatically and then used "UNLOAD" to generate a file, but that same file fails to put back the \n character when used with the LOAD command.

    UNLOAD generates a file like:


    I also tried


    Does anyone know how I can do this?

  2. #2
    Join Date
    May 2004
    New York
    you can try inserting records and then use an update statment
    something like

    update tablename set column[5,6] = "\n"
    where statment

    Don't know if that is an option for you

  3. #3
    Join Date
    Jun 2006
    That's certainly an option if it'll work. I'll give it a shot in the morning.


  4. #4
    Join Date
    Jun 2006
    I gave this a shot, but Informix gives me the error:

    "A blob subscript is not allowed within this context"

    I guess it can't be used for updating rows. I played around with the subscripts and it does work for SELECTs.

    Some Google searching found:

    616 A TEXT or BYTE subscript is not allowed within this context.

    This UPDATE or INSERT statement specifies a subscripted column of BYTE or TEXT data type as a destination. Subscript notation is not allowed in this context; a BYTE or TEXT (or any other) value must be replaced in full. Revise the statement to assign into whole columns.

Posting Permissions

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