Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

fer_damas
Contributor

Error when trying to execute a procedure (in Qlik Sense)

Hi everyone,

I've been trying to execute a procedure, but with no success.

Even though i tried to follow all topics here in qcommunity, no one gave me insights to find a solution.

This is the error I am receiving:

ERROR.png

And here is the just a beggining part of this procedure. I am posting it here because i have no SQL skills at all and might be missing something.

:

CREATE OR REPLACE PROCEDURE CUSTOM.pd_resultados (pAMI IN varchar2, pAMF IN varchar2, resultcursor IN OUT rcr.pkTipos.resultcursor_Type)

IS

vDataI date;

vDataF date;

IndCursor integer;

sSQL    Long;

sSQL1   Long;

sSQL2   Long;

sSQL3   Long;

vcDataI varchar2(10);

vcDataF varchar2(10);

BEGIN

vDataI := to_date(pAMI||'-01','yyyy-mm-dd');

if substr(pAMF,6,2) = '12'

then vDataF := to_date('01-01-'||to_char(to_number(substr(pAMF,1,4))+1),'dd-mm-yyyy');

elsif substr(pAMF,6,2) < '09'

   then vDataF := to_date('01-0'||to_char(to_number(substr(pAMF,6,2))+1)||'-'||substr(pAMF,1,4),'dd-mm-yyyy');

   else vDataF := to_date('01-'||to_char(to_number(substr(pAMF,6,2))+1)||'-'||substr(pAMF,1,4),'dd-mm-yyyy');

end if;

vcDataI := to_char(vDataI,'dd-mm-yyyy');

vcDataF := to_char(vDataF,'dd-mm-yyyy');

sSQL :=

(begin creating tables)

4 Replies
rittermd
Honored Contributor

Re: Error when trying to execute a procedure (in Qlik Sense)

This is the code that I use in one of my apps to run some SQL stored procedures.  I don't recall what the 1 is for.  But it did not work until I put that there.  I found it in a post in the community.  Might be different in Oracle.  But not sure.

Functional_BM_CM:

SQL

exec dbo.batch_XML_CFORatings 1, '4/01/2016','4/30/2016','M','STR';

SQL

exec dbo.batch_XML_CFORatings 1, '4/01/2016','4/30/2016','S','STR';

SQL

exec dbo.batch_XML_CFORatings 1, '4/01/2016','4/30/2016','C','STR';

fer_damas
Contributor

Re: Error when trying to execute a procedure (in Qlik Sense)

Hey, Mark, thank you for your answer

Unfortunatelly, it did not work Still gives me the same error msg.

Thanks,

Fernando

shraddha_g
Honored Contributor III

Re: Error when trying to execute a procedure (in Qlik Sense)

Try Preceding load with limited number of fields

Load Field1,

         Field2 ,

         Field3;

SQL EXEC CUSTOM.PD_RESULTADOS '2016-01-01';

fer_damas
Contributor

Re: Error when trying to execute a procedure (in Qlik Sense)

Thanks for your answer!

Still no good, though

Community Browser