Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Feild values Split with quotes

S567Aug 30 2019 — edited Sep 6 2019

Heloo Expert's,

I am a below query ...I used list aggreagate but i am getting o/p as list

with temp table as (

select  'amit@gmail.com' email_address,sysdate order_date from dual

union all

select 'fellow@yahoo.com' email_address, sysdate order_date from dual)

  select listagg(email_address, ',')  within group (order by order_date desc) from temp_table

o/p

amit@gmail.com,fellow@yahoo.com

expected o/p but i need  'amit@gmail.com','fellow@yahoo.com'

Please advise.

This post has been answered by mathguy on Aug 30 2019
Jump to Answer
Comments
Post Details
Added on Aug 30 2019
14 comments
254 views