Re: Concatenation operator [message #373155] |
Fri, 30 March 2001 02:33 |
Phenoracle
Messages: 35 Registered: March 2001
|
Member |
|
|
Hi,
Create a Pl/SQL block that loops through a cursor of which your column is retrieved.
This in turn will allow a variable to hold all the rows as a string.
Then insert the variable into another table.
DECLARE
CURSOR cur_det
IS
SELECT ename
FROM emp;
v_row VARCHAR(255);
BEGIN
FOR rec_det IN cur_det LOOP
v_row := v_row||' '||rec_det.ENAME;
END LOOP;
-- Insert v_row into your table2
-- Have a look at v_row
DBMS_OUTPUT.PUT_LINE(v_row);
EXCEPTION
WHEN OTHERS THEN
RAISE;
END;
/
Hope this is of help.
Phenoracle
|
|
|