表: SOURCE (Label,SerialNo )
行数:
a 1
b 2
c 3
目标表:目标(Concat)
预期行
1a
2b
3c
这需要通过程序来实现。
答案 0 :(得分:0)
Hi this procedure should satisfy your query.Please let me know if you want anything else. Thanks
CREATE OR REPLACE
PROCEDURE query_answered
AS
BEGIN
FOR rec IN
( SELECT sr_no||' '||name AS combined_value FROM avrajit
)
LOOP
INSERT INTO av_dup
(department
) VALUES
(rec.combined_value
);
COMMIT;
END LOOP;
EXCEPTION
WHEN OTHERS THEN
dbms_output.put_line('Error captured'||' '||sqlerrm);
END query_answered;
----------------------------------
OUTPUT
----------------------------------
BEGIN
query_answered();
END;