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

Announcements
Save $650 on Qlik Connect, Dec 1 - 7, our lowest price of the year. Register with code CYBERWEEK: Register
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

passing input parameter to STORED Procedure

hi.......

i am stuck in QV prob so thought of sending my query to community hoping somebody will have solution:) to my prob:)

here goes my prob:


Create Procedure test_proc @date1 datetime, @date2 Datetime, @Vol Float Output
AS
Begin
Select @Vol = Max(Volume) From Test Where Date >= @Date1 and Date <= @date2
End

this is my proc @ backend which accepts two input parametes date1 & date2 ...... based on that it returns output in @vol.

code i'm using in QV

Input:

load

Input('Enter an from date value', 'Input box') as value1_date,
Input('Enter an end date value', 'Input box') as value2_date
autogenerate 1;

Let FromDate = peek('value1_date','2008/01/04','Input');
Let DateTo = peek('value2_date','2009/01/04','Input');

sql

Declare
@vol int,
@FromDate as datetime,
@DateTo as datetime

Execute [dbo].[test_proc] '$(FromDate)', '$(DateTo)', @vol = @vol output

Select @vol

when i refresh my appn it asks me for two input dates , but doesnt display any output...

what i believe is that it might not be passing '$variable' to input parameters . i confirmed this by adding same code to another sp which gives error saying" blan fields not allowed in sql"

i was jus wondering if there is any other way to pass input parameter to SP thru qlikview

0 Replies