Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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 !
Hi masba,
Try like this:
Load
Field1
Field2
...
;
Sql Exec StoredProcedureName 'Variable1', 'Variable2'
;
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
Like:
SQL EXEC DatabaseName.dbo.ProcedureName @Para1 = $(vPara1), @Para2 = $(vPara2), @Para3 = $(vPara3), @Para4 = $(vPara4) ;
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
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
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.
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
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