Is it possible to have some kind of static variable in sql statements say....when a column = whatever u can append the value of another column in that row to the variable?
Printable View
Is it possible to have some kind of static variable in sql statements say....when a column = whatever u can append the value of another column in that row to the variable?
dont understand what you really mean but I will try...
Code:declare
l_append_tab varchar2(100);
begin
for i in (select * from dba_tables
where owner in ('LSC', 'TEST')
order by owner, table_name)
loop
if i.owner = 'LSC'
then
l_append_tab := i.owner||'.'||i.table_name;
dbms_output.put_line(l_append_tab);
end if;
end loop;
end;
/
LSC.A
LSC.A001
LSC.A002
LSC.A003
LSC.B
LSC.BONUS
LSC.DEPT
LSC.DUMMY
LSC.EMP
LSC.INVOICE
LSC.LSCEMP
LSC.SALGRADE
PL/SQL procedure successfully completed.