If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > concat limit

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 09-17-08, 11:17
jd020674 jd020674 is offline
Registered User
 
Join Date: Sep 2008
Posts: 2
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
Reply With Quote
  #2 (permalink)  
Old 09-17-08, 11:57
dav1mo dav1mo is offline
Registered User
 
Join Date: Dec 2007
Location: Richmond, VA
Posts: 782
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
Reply With Quote
  #3 (permalink)  
Old 09-18-08, 04:00
jd020674 jd020674 is offline
Registered User
 
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
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On