Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

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
Master
Master

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';

Anonymous
Not applicable
Author

Hey, Mark, thank you for your answer

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

Thanks,

Fernando

shraddha_g
Partner - Master III
Partner - Master III

Try Preceding load with limited number of fields

Load Field1,

         Field2 ,

         Field3;

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

Anonymous
Not applicable
Author

Thanks for your answer!

Still no good, though