Discussions
Categories
- 196.7K All Categories
- 2.2K Data
- 235 Big Data Appliance
- 1.9K Data Science
- 449.8K Databases
- 221.5K General Database Discussions
- 3.8K Java and JavaScript in the Database
- 31 Multilingual Engine
- 549 MySQL Community Space
- 477 NoSQL Database
- 7.9K Oracle Database Express Edition (XE)
- 3K ORDS, SODA & JSON in the Database
- 532 SQLcl
- 4K SQL Developer Data Modeler
- 186.8K SQL & PL/SQL
- 21.3K SQL Developer
- 295.4K Development
- 17 Developer Projects
- 138 Programming Languages
- 292.1K Development Tools
- 104 DevOps
- 3.1K QA/Testing
- 645.9K Java
- 28 Java Learning Subscription
- 37K Database Connectivity
- 153 Java Community Process
- 105 Java 25
- 22.1K Java APIs
- 138.1K Java Development Tools
- 165.3K Java EE (Java Enterprise Edition)
- 17 Java Essentials
- 158 Java 8 Questions
- 85.9K Java Programming
- 79 Java Puzzle Ball
- 65.1K New To Java
- 1.7K Training / Learning / Certification
- 13.8K Java HotSpot Virtual Machine
- 94.2K Java SE
- 13.8K Java Security
- 203 Java User Groups
- 24 JavaScript - Nashorn
- Programs
- 394 LiveLabs
- 37 Workshops
- 10.2K Software
- 6.7K Berkeley DB Family
- 3.5K JHeadstart
- 5.6K Other Languages
- 2.3K Chinese
- 170 Deutsche Oracle Community
- 1.1K Español
- 1.9K Japanese
- 230 Portuguese
Slipt single line to Multiple lines

Hi All
Working EBS Version 12.1.3
please see below query using as function
there are multiple receipts for one invoice
output displaying as 8924, 8923
i want data output should be as
'Paid Receipt '8924 no of days Over due days
'Paid Receipt '8923 no of days Over due days
Please i need help
SELECT listagg(c.receipt_number, ', ') within group (order by c.receipt_number) into p_receipt_num
FROM ar_payment_schedules_all pay,
ar_receivable_applications_all b,
ar_cash_receipts_all c,
xxink_ra_customers d,
hz_parties adr,
ar_customer_profiles_v col
WHERE c.pay_from_customer = d.customer_id
AND c.cash_receipt_id = b.cash_receipt_id
AND d.party_id = adr.party_id
AND d.customer_name >= NVL (p_cus_name_from, d.customer_name)
AND d.customer_name <= NVL (p_cus_name_to, d.customer_name)
-- AND col.collector_name = NVL (:p_collector, col.collector_name)
-- AND NVL(d.customer_class_code, 'A') = NVL (:p_class, NVL (d.customer_class_code, 'A'))
AND d.customer_id = col.customer_id
AND b.applied_payment_schedule_id = pay.payment_schedule_id
AND pay.org_id = c.org_id
AND pay.class <> 'PMT'
AND c.status <> 'REV'
AND b.status = 'APP'
AND pay.customer_id = d.customer_id
AND TRUNC (c.receipt_date) <= TRUNC (p_trx_date2)
and nvl(DISPLAY,'N') = 'Y'
-- AND TRUNC (b.apply_date) > TRUNC (:date1)
AND pay.trx_number = TRX_NUM;
Regards,
Best Answer
-
Do you mean something like this:
with ar_cash_receipts_all(receipt_number) as ( select 8924 from dual union all select 8923 from dual)select listagg('Paid Receipt ' ||c.receipt_number || ' no of days Over due days', chr(10)) within group (order by c.receipt_number) as textfrom ar_cash_receipts_all cTEXT --------------------------------------------------Paid Receipt 8923 no of days Over due daysPaid Receipt 8924 no of days Over due days
If your client system is Windows use chr(13)||chr(10) instead.
Answers
-
Do you mean something like this:
with ar_cash_receipts_all(receipt_number) as ( select 8924 from dual union all select 8923 from dual)select listagg('Paid Receipt ' ||c.receipt_number || ' no of days Over due days', chr(10)) within group (order by c.receipt_number) as textfrom ar_cash_receipts_all cTEXT --------------------------------------------------Paid Receipt 8923 no of days Over due daysPaid Receipt 8924 no of days Over due days
If your client system is Windows use chr(13)||chr(10) instead.
-
Thank You Very Much