Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Connect Qlik with SQL Stored Procedure

Hi,

I have some problem for connect Qlik with SQL Store Procedures. I have developed two SP and Qlik only works with on of this two.

EXECUTE [Demo Database NAV (8-7)].[dbo].NAVConnectorUnshared @TableName = 'Customer', @TableFields = '[No_],[Name]';

EXECUTE [Demo Database NAV (8-7)].[dbo].NAVConnectorShared @TableName = 'Company', @TableFields = '[Name],[XRT]';

In the attached picture you can see the result of the SP, apparently the results are correct. The select that SP genetares are these:

SELECT 'COPIA' AS COMPANY,[No_],[Name] FROM [Demo Database NAV (8-7)].[dbo].[COPIA$Customer] UNION SELECT 'CRONUS España S.A.' AS COMPANY,[No_],[Name] FROM [Demo Database NAV (8-7)].[dbo].[CRONUS España S_A_$Customer]

SELECT [Name],[XRT] FROM [Demo Database NAV (8-7)].[dbo].[Company]

In Qlik View I have writte the next code:

OLEDB CONNECT TO [Provider=SQLOLEDB....-

CLIENTES2:
LOAD *;
SQL EXECUTE [Demo Database NAV (8-7)].[dbo].NAVConnectorUnshared @TableName = 'Customer', @TableFields = '[No_],[Name]';

EMPRESAS2:
LOAD
Name as Nombre,
XRT as Tesorería;
SQL EXECUTE [Demo Database NAV (8-7)].[dbo].NAVConnectorShared @TableName = 'Company', @TableFields = '[Name],[XRT]';

When I run the script no error message appears but when I try to select the table only the table EMPRESA2 appears. Where is the table CLIENTES2?

Thanks for your help.

0 Replies