select a row in table, but the owner of table will be not known.
select owner from dba_objects where object_name='XXX';
select C1, C2 from :owner.XXX where C3='VALUE';
How to use the contain off variable in a from value.
select a row in table, but the owner of table will be not known.
select owner from dba_objects where object_name='XXX';
select C1, C2 from :owner.XXX where C3='VALUE';
How to use the contain off variable in a from value.
Dynamic SQL in a PL/SQL code...
vi file.sql
declare
sap_owner varchar2(30);
begin
select owner into sap_owner from dba_objects where object_name='CVERS_TXT';
execute immediate 'select STEXT from '||sap_owner||'.CVERS_TXT where LANGU=''E''';
end;
/
end_file.sql
when @file.sql
the sql is now ok, but no echo for the value
Partager