Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I'd like to run one sql and with the result use like parameters to execute another sql inside qlikview.
I could to do it by pl/sql but i'd like to do inside qlikview.
Eg.
cursor iniciar is select name from table A;
cursor acionar(nameB varchar2) is select salary tableB where name =nameB;
begin
for i in iniciar loop
for j in acionar(i.nameB ) loop
insert into c (salary) values (j.sal)
end loop;
end loop;
end;
this is just an idea as now I haven't an Oracle db to check it; adapt to your question
tableA:
//
// replace inline load with select from Oracle
//
LOAD * INLINE [
nameB
1
2
5
];
//
// loop on rows of qlikview table (same as loop on Oracle outer table, first cursor)
//
for i = 1 to noofrows('tableA')
let vVar = fieldvalue('nameB',$(i));
trace $(vVar);
//
// read from Oracle inner table (cursor 2) filtering with row/colum of tableA
//
tableB:
load *;
SQL
select salary from tableBOracle where name = '$(vVar)';
next i
to insert in Oracle I think you have to set open database in read/write (script editor, tab settings), ask your oracle dba to grant, make a package or function or proc, ......, etc, etc........
Re: How to use PL/SQL package call in qlikivew script
but I personally would not do it
this is just an idea as now I haven't an Oracle db to check it; adapt to your question
tableA:
//
// replace inline load with select from Oracle
//
LOAD * INLINE [
nameB
1
2
5
];
//
// loop on rows of qlikview table (same as loop on Oracle outer table, first cursor)
//
for i = 1 to noofrows('tableA')
let vVar = fieldvalue('nameB',$(i));
trace $(vVar);
//
// read from Oracle inner table (cursor 2) filtering with row/colum of tableA
//
tableB:
load *;
SQL
select salary from tableBOracle where name = '$(vVar)';
next i
to insert in Oracle I think you have to set open database in read/write (script editor, tab settings), ask your oracle dba to grant, make a package or function or proc, ......, etc, etc........
Re: How to use PL/SQL package call in qlikivew script
but I personally would not do it
Thank U so much.