Hi. I have the following code I've been playing with to better understand Collections. I have a 'how to' question. Is there a way to dbms_output.putline an entire record or will I have to name each and every column as I started to do in the code below?
If there's no single statement for outputing a record, is there a good way to dynamically loop through the record and using dbms_output.putline to output each column without having to name each column explicitly?
Thanks so much for any help.
DECLARE
pc_info_rec performance_clusters%rowtype;
CURSOR C1 IS
SELECT *
INTO pc_info_rec
FROM performance_clusters
WHERE rownum < 11;
BEGIN
OPEN C1;
LOOP
FETCH C1 INTO pc_info_rec;
EXIT WHEN C1%NOTFOUND;
-- Currently have to name each column in the record, but would prefer a simpler way to output the entire record
DBMS_OUTPUT.PUT_LINE (pc_info_rec.pc_code||', '||pc_info_rec.zip3);
END LOOP;
CLOSE C1;
END;
/