|
Publicité ' | |||||||||||||||||||||||
|
|
#1 |
|
Invité de passage
![]() Inscription : septembre 2007 Messages : 5 ![]() |
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. |
|
|
00
|
|
|
#2 |
|
Membre chevronné
![]() Inscription : septembre 2007 Messages : 519 ![]() |
Dynamic SQL in a PL/SQL code...
__________________
Pas de réponse aux messages privés. Faites un post pour vos problèmes, que tout le monde en profite...
|
|
|
00
|
|
|
#3 |
|
Invité de passage
![]() Inscription : septembre 2007 Messages : 5 ![]() |
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 |
|
|
00
|
Copyright © 2000-2012 - www.developpez.com