× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



IMO, this is a case where you need a HLL to process this efficiently. At the
very least, you might consider doing this as a SQL udf to return a string of
concatenated comments.

Sorry, but I cannot work up an example right now...

Eric

-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx]On Behalf Of Chandana Silva
Sent: Tuesday, April 17, 2007 7:53 AM
To: RPG programming on the AS400 / iSeries
Subject: SQL Concatenation problem


Dear SQL Gurus and all,

I am trying to contcatenate a field recursively for a selected record and
wondering if there is a way to do it,

Here is the problem .. The table below has a field named Comments and I want
to select the Acct, when the Type1 in ('Z') and Type2 in ('X') and conact the
Comments for the five lines where Type1='A'. Object to get only two records
from the Select statement for the following.

Trying to get this for Comments:

Received a call from Xxxx regarding past due payment,
advised could not make both this month and next....


ACCT COMMENTS TYPE1 TYPE2 12345678 Received a call
from Xxxx regarding past due payme Z X 12345678 nt, advised could not
make both this month and nex A 12345678 t month payments by 06-01-2007.
Transferred to Bank A 12345678 Branch. Contact Ph# - 1111111111 A
12345678 >>> SMITHBOY1 A 12345678 Received a call from Xx regarding
past due payment Z X 12345678 , advised could not make both this month
and next A 12345678 month payments by 06-01-2007. Transferred to Default
A 12345678 s. Contact Ph# - 1111111111 A 12345678 >>> JOHNDOE1
A

Greatly appreciate your kind help and time ..






As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.