Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to Call Store Procedure in Qlikview

Dear All,

I'm new in Qlikview. how can i call my Store Procedure in qlikview which contain 4 parameters.Please help me

Regards,

Masba !

8 Replies
avinashelite

Hi masba,

Try like this:

Load

Field1

Field2

...

;

Sql Exec StoredProcedureName 'Variable1', 'Variable2'

;

deepakqlikview_123
Specialist
Specialist

Hi Masba,

For calling SQL stored proc in QV u need to set up ODBC connection and after u r able to use syntax.

Thanks

tresesco
MVP
MVP

Like:

SQL EXEC DatabaseName.dbo.ProcedureName @Para1 = $(vPara1), @Para2 = $(vPara2), @Para3 = $(vPara3), @Para4 = $(vPara4) ;

Not applicable
Author

Dear Deepak,

I have already setup ODBC connection. By ODBC connection i can read data from table. Now I'm facing problem in Store Procedure. I have uses below command to load the data.

Sql   Execute COO_Stock('G044','13','03','07/01/2012','MM/DD/YYYY hh:mi:ss AM','07/20/2014 12:00:00 AM','MM/DD/YYYY hh:mi:ss AM');

Regards,

Masba

rajeshvaswani77
Specialist III
Specialist III

Hi,

Not a good practice to call the Stored Procedure from QlikView.

After studying the logic you can build the logic in QlikView or have this in the Reporting Layer.

thanks,

Rajesh Vaswani

Not applicable
Author

That really depends on the context, and the nature and complexity of the stored procedure contents.

Duplicating and translating complex SQL stored procs isn't always desirable. This may be a lot of work, and you'll have two code bases to maintain with identical functionality.

I think performance wise the stored proc may also be considerably faster as it employs SQL server logic and table indexes. Not to mention the high preformance hardware which companies often have allocated to critical SQL servers.

Not applicable
Author

Dear Tresesco,

Based on your reply i have change my qlikview query.

SQL EXEC TEST.dbo.COO_Stock @Gallerie_ = 'G044', @Brancode_ = '13', @Category_ = '03', @Fromdate_ = '07/01/2012',@Todate_='07/01/2012';

Note: My Database Name: TEST

          Procedure Name: Coo_Stock

          Parameters Name: @Gallerie_,  @Brancode_,@C,ategory_ @Fromdate_, @Todate_

If i mistake anything plz correct me..

Regards,

Masba

rajeshvaswani77
Specialist III
Specialist III

Well if you are moving from something Legacy to QlikView, you can do away with the SP's.

Ideally SPs are not meant to be called from QlikView.

thanks,

Rajesh Vaswani