question

ashwindhurve avatar image
ashwindhurve asked

How to combine multiple rows into 1 row

Hello, how to display multiple messages on 1 string field. Below is output.



I'd like to display message as



Here is the code i'm using

This is the latest code

%InsertSelect(RADV_DTL_TAO, PMT_INVOICE_TBL,RADVISE_KEY = C.PMT_ID, REFERENCE_FLD = A.INVOICE_ID, DATE1 = A.INVOICE_DT, PROCESS_INSTANCE = B.PROCESS_INSTANCE, CURRENCY_CD = A.PAID_AMT_CURRENCY, AMOUNT_1 = A.GROSS_AMT, AMOUNT_2 = A.PAID_AMT, AMOUNT_3 = A.DISCOUNT_TAKEN , DESCR254 = A.DESCR254_MIXED, PAY_DOC_ID = A.PAY_DOC_ID, DESCRLONG=A.DESCR254_MIXED +CHAR(10)+C1.PYMNT_MESSAGE)

FROM PS_PMT_INVOICE_TBL A, ((PS_VOUCHER B1 LEFT OUTER JOIN PS_PYMNT_VCHR_MSG C1 ON B1.BUSINESS_UNIT = C1.BUSINESS_UNIT

AND B1.VOUCHER_ID = C1.VOUCHER_ID ) LEFT OUTER JOIN PS_PYMNT_MSG_LN D1 ON C1.PYMNT_MESSAGE_CD = D1.PYMNT_MESSAGE), %Table(PMT_STL_TAO) B , PS_PMT_DETAIL_TBL C , PS_PMT_SRC_DEFN D WHERE B.PROCESS_INSTANCE = %ProcessInstance

AND B.PMT_SOURCE = D.PMT_SOURCE

AND D.REMIT_ADVISE_OPT='Y'

AND A.PMT_ID = B.PMT_ID

AND C.PMT_ID = B.PMT_ID

AND B1.BUSINESS_UNIT = A.BUSINESS_UNIT

AND B1.INVOICE_ID = A.INVOICE_ID

AND B1.INVOICE_DT = A.INVOICE_DT


Could someone please fix the issue?


Thanks


sqlserver
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

0 Answers

·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.