V Raja Sekhar Pothuri, September 08, 2017 - 2:52 pm UTC
I don't understand what's the significance of having "no column to group"?
Ans: I want to avoid loop in stored procedure for a result set returned by a 'select' query.
with loop
=========
for cur_subsc in (select contact_no from address_master where area_code .... )
loop
////
loop end
with out loop
=============
select LISTAGG( tab1.col1, ',') WITHIN GROUP ( ORDER BY tab1.col1) TEMP into contactNos from table1 tab1;
select LISTAGG( tab2.col2, ',') WITHIN GROUP ( ORDER BY tab2.col2) TEMP1 into plans from table2 tab2 where tab2.col1 in ( contactNos );
Thanks for sharing the solution, I am able to implement this.