Hello everyone and Thank you for your time. I resolved this issue and all thanks to Ederson.
Here is the solution:
SELECT WM_CONCAT(STUDENT_NAME) FROM STUDENT.STUDENT_DETAILS WHERE CLASS_ID= 'C';
Now, if you use this in a stored procedure or PLSQL, you just need to create a variable and use SELECT INTO with it and print the variable.
Here is the code
DECLARE C_NAMES VARCHAR2(100); BEGIN SELECT WM_CONCAT(STUDENT_NAME) INTO C_NAMES FROM STUDENT.STUDENT_DETAILS WHERE CLASS_ID= 'C'; dbms_output.put_line(sname); END;
Thanks again for helping people.
vrindamarfatia
source share