Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
vbn598
Contributor
Contributor

PL-SQL procedures

I'm on Qlik sense and I need to fetch one of the views from my oracle pl sql database.

This view requires me to run 2 procedures to set some parameters otherwise it won't show any records. 

These procedures are contained inside of packages where other functions are contained to obtain the values added. These functions are called by the view and is why I need to run the procedures.

I have seen a similar problem being brought up for Qlik view but it doesn't  seem like the same solution works on Qlik sense.

 

Inside of PL/SQL developer this example block of code works to get the view to work as intended:

begin
   pab_gl5001.prb_init(1);
   pab_init_per.prb_init_uneper('2005','1');
   FOR t IN (Select ciecleint from VI_GL5001)
    LOOP
      dbms_output.put_line(t.ciecleint);
    END LOOP;
end;

 

In the load script in Qlik sense I have added 2 lines of code to call the procedures next to what was already generated automatically  by the application when I connected to the oracle database with the view.

 

LIB CONNECT TO [Oracle_database)];


SQL CALL DEVTEST.pab_gl5001.prb_init(1)!EXECUTE_NON_SELECT_QUERY;

SQL CALL DEVTEST.pab_init_per.prb_init_uneper('2005','1')!EXECUTE_NON_SELECT_QUERY;

[VI_GL5001]:
SQL SELECT "RAPTRI",
"CIECLEINT",
"CIFCLEINT",
"CPTCLEINT",
"UNACLEINT",
"SFUCLEINTFC",
"CIFCOD",
"CIFDSCABR",
"NATCTB_ORDRE",
"VAEVALCLE",
"VAESYSNATCTBDESC",
"SFUCOD",
"SFUDSC",
"CODETRI1",
"DESCTRI1",
"CODETRI2",
"DESCTRI2",
"PERTRT",
"CUMULATIF",
"CUSMNT_PER"
FROM "DEVTEST"."VI_GL5001";

 

The application doesn't seem to throw any errors with the call statements I added when I load the data again, meaning it recognized the 2 procedures I asked it to call (it even throws errors if I don't add the parameters), but the result of the select is still 0 lines.

What am I missing?

 

Labels (1)
0 Replies