|
-
"execute immediate" problem
Hi,
Thanks for your help so far. I have tried your suggestion. However it does not work. I still get errors.
My code is below:
set serveroutput on size 1000000;
declare
cursor c1 is
select table_name from cols where column_name = 'ID_CTLGRP' and table_name like 'TUA%';
begin
--loop through tables with field CTLGRP
For tabs in c1 loop
dbms_output.put_line ('Processing Table:'||tabs.table_name);
execute immediate 'Update '|| tabs.table_name ||' set ID_CTLGRP = REPLACE(ID_CTLGRP,chr(39),''_'')'||' WHERE ID_CTLGRP LIKE ''%''%''';
End loop; --tables
dbms_output.put_line ('Job Complete');
end;
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|