Results 1 to 3 of 3

Thread: concat limit

  1. #1
    Join Date
    Sep 2008
    Posts
    2

    Unanswered: concat limit

    Hello,

    I want to concat 20 colomns in a DB2 SQL request (with || command).

    'CDPAAB= '||RIGHT(' '||
    RTRIM( REC181_CDPAAB) ,12)||'|'||
    'CPCRYP= '||RIGHT('000000000000'||
    RTRIM(CHAR(REC181_CPCRYP)),12)||'|'||
    'DDCONT= '||RIGHT('000000000000'||
    RTRIM(CHAR(REC181_DDCONT)),12)||'|'||
    'HECRCO= '||RIGHT('000000000000'||
    RTRIM(CHAR(REC181_HECRCO)),12)||'|'||
    'DMDCON= '||RIGHT('000000000000'||
    RTRIM(CHAR(REC181_DMDCON)),12)||'|'||
    'HEMCON= '||RIGHT('000000000000'||
    RTRIM(CHAR(REC181_HEMCON)),12)||'|'||
    'QTAPMO= '||RIGHT('000000000000'||
    RTRIM(CHAR(REC181_QTAPMO)),12)||'|'||
    'QTAPM1= '||RIGHT('000000000000'||
    RTRIM(CHAR(REC181_QTAPM1)),12)||'|'


    but the result is stop at HECRCO... The rest of the command is ignore.
    Is there a limit to the DB2 concat command ?

    Thanks a lot

    Jack

  2. #2
    Join Date
    Dec 2007
    Location
    Richmond, VA
    Posts
    1,328
    Provided Answers: 5
    I know that I have concatenated strings that are longer than what you are showing above. What type of error are you getting? Is it possible that whatever you are running this in isn't displaying the rest of the column due to length of display field. For instance in QMF on the form panels you can state that a particular field is shorter than what it really is and it will truncate that column in every row.

    Dave

  3. #3
    Join Date
    Sep 2008
    Posts
    2

    I've find

    The problem comme from SPUFI parameters.

    Output format characteristics:
    10 MAX NUMERIC FIELD ===> 100 (Maximum width for numeric fields)
    11 MAX CHAR FIELD .. ===> 80 (Maximum width for character fields)12 COLUMN HEADING .. ===> NAMES (NAMES, LABELS, ANY or BOTH)

    I put the value to 900 and it's Ok.

    Thank for your help

    Jack

Posting Permissions

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