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

Announcements
Qlik and ServiceNow Partner to Bring Trusted Enterprise Context into AI-Powered Workflows. Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
niltonrocha
Contributor
Contributor

Procedure Oracle com parametro de Saida (out) Cursor - QlikSense

Estou tendo problema para rodar uma procedure no oracle retornar algumas linhas passando parametros:

1 - Cursor  -  não passo pois é de OUT (saida) -  retorna as linhas do criterio dos parametros 2 e 3 abaixo

2 - Data Inicial

3 - Data Final

mas esta retornando erro de numero de parametros ao executar o script de carga , no oracle roda normalmente.

Sabem se aceita este parametro (1) de saida ou ja usou procedure desta forma e rodou normalmente, poderiam me ajudar ?

MOVE:

LOAD *;

SQL CALL SP_MOV_PERIODO('$(vDataInicio)', '$(vDataFim)');

Erro:

Connector reply error: SQL##f - SqlState: S1000, ErrorCode: 6553, ErrorMsg: [Oracle][ODBC][Ora]ORA-06553: PLS-306: wrong number or types of arguments in call





Labels (1)
1 Solution

Accepted Solutions
Thiago_Justen_

Nilton,

Lembro de ter lido algo sobre o QS não conseguir trabalhar com cursor...de qualquer forma, corro risco de estar enganado e por isso sugiro o teste:

Oracle procedure

CREATE OR REPLACE PROCEDURE test2 (prc out sys_refcursor) AS

BEGIN

   SEU_PROCEDURE

END ;

Qlik

t2:

SQL

{CALL test2  };

Thiago Justen Teixeira Gonçalves
Farol BI
WhatsApp: 24 98152-1675
Skype: justen.thiago

View solution in original post

7 Replies
Thiago_Justen_

Nilton,

Lembro de ter lido algo sobre o QS não conseguir trabalhar com cursor...de qualquer forma, corro risco de estar enganado e por isso sugiro o teste:

Oracle procedure

CREATE OR REPLACE PROCEDURE test2 (prc out sys_refcursor) AS

BEGIN

   SEU_PROCEDURE

END ;

Qlik

t2:

SQL

{CALL test2  };

Thiago Justen Teixeira Gonçalves
Farol BI
WhatsApp: 24 98152-1675
Skype: justen.thiago
BalaBhaskar_Qlik

May be try like this:

Issue occurred, because of the spelling and declaration of the subprogram name. Also confirm that its call is correct, its parameters are of the right datatype, and, if it is not a built-in function, that its declaration is placed correctly in the block structure.

// Call Oracle data summarization procedure
sql call corp_report.update_rpt_data('$(var_COUNTRY)');

niltonrocha
Contributor
Contributor
Author

Thiago,

Coloquei entre { }  e funcionou corretamente.

MOVE:

SQL  { CALL SP_MOV_PERIODO('$(vDataInicio)', '$(vDataFim)')  };

Obrigado.

Thiago_Justen_

Não esqueça de marcar a resposta como correta e assim fecharmos o tópico.

Na dúvida de como fazer isso veja o item 2.3 do Manual do usuário | Como criar e gerir minhas perguntas?

Thiago Justen Teixeira Gonçalves
Farol BI
WhatsApp: 24 98152-1675
Skype: justen.thiago
niltonrocha
Contributor
Contributor
Author

Bala,

I changed the call by putting keys "{ }" before Call  see below syntax :

MOVE:

SQL  { CALL SP_MOV_PERIODO('$(vDataInicio)', '$(vDataFim)')  };

And worked correctly.

Thanks

BalaBhaskar_Qlik

Wow Superb, you got the solution.

Mark it as answer & close the thread.