<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic passing input parameter to STORED Procedure in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/passing-input-parameter-to-STORED-Procedure/m-p/160656#M34862</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi.......&lt;/P&gt;&lt;P&gt;i am stuck in QV prob so thought of sending my query to community hoping somebody will have solution:) to my prob:)&lt;/P&gt;&lt;P&gt;here goes my prob:&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Create Procedure test_proc @date1 datetime, @date2 Datetime, @Vol Float Output&lt;BR /&gt;AS&lt;BR /&gt;Begin&lt;BR /&gt;Select @Vol = Max(Volume) From Test Where Date &amp;gt;= @Date1 and Date &amp;lt;= @date2&lt;BR /&gt;End&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;this is my proc @ backend which accepts two input parametes date1 &amp;amp; date2 ...... based on that it returns output in @vol.&lt;/P&gt;&lt;P&gt;code i'm using in QV&lt;/P&gt;&lt;P&gt;Input:&lt;BR /&gt;&lt;BR /&gt;load&lt;BR /&gt;&lt;BR /&gt;Input('Enter an from date value', 'Input box') as value1_date,&lt;BR /&gt;Input('Enter an end date value', 'Input box') as value2_date&lt;BR /&gt;autogenerate 1;&lt;BR /&gt;&lt;BR /&gt;Let FromDate = peek('value1_date','2008/01/04','Input');&lt;BR /&gt;Let DateTo = peek('value2_date','2009/01/04','Input');&lt;BR /&gt;&lt;BR /&gt;sql&lt;BR /&gt;&lt;BR /&gt;Declare&lt;BR /&gt;@vol int,&lt;BR /&gt;@FromDate as datetime,&lt;BR /&gt;@DateTo as datetime&lt;BR /&gt;&lt;BR /&gt;Execute [dbo].[test_proc] '$(FromDate)', '$(DateTo)', @vol = @vol output&lt;BR /&gt;&lt;BR /&gt;Select @vol&lt;/P&gt;&lt;P&gt;when i refresh my appn it asks me for two input dates , but doesnt display any output...&lt;/P&gt;&lt;P&gt;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"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i was jus wondering if there is any other way to pass input parameter to SP thru qlikview&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 19 Aug 2009 16:04:57 GMT</pubDate>
    <dc:creator />
    <dc:date>2009-08-19T16:04:57Z</dc:date>
    <item>
      <title>passing input parameter to STORED Procedure</title>
      <link>https://community.qlik.com/t5/QlikView/passing-input-parameter-to-STORED-Procedure/m-p/160656#M34862</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi.......&lt;/P&gt;&lt;P&gt;i am stuck in QV prob so thought of sending my query to community hoping somebody will have solution:) to my prob:)&lt;/P&gt;&lt;P&gt;here goes my prob:&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Create Procedure test_proc @date1 datetime, @date2 Datetime, @Vol Float Output&lt;BR /&gt;AS&lt;BR /&gt;Begin&lt;BR /&gt;Select @Vol = Max(Volume) From Test Where Date &amp;gt;= @Date1 and Date &amp;lt;= @date2&lt;BR /&gt;End&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;this is my proc @ backend which accepts two input parametes date1 &amp;amp; date2 ...... based on that it returns output in @vol.&lt;/P&gt;&lt;P&gt;code i'm using in QV&lt;/P&gt;&lt;P&gt;Input:&lt;BR /&gt;&lt;BR /&gt;load&lt;BR /&gt;&lt;BR /&gt;Input('Enter an from date value', 'Input box') as value1_date,&lt;BR /&gt;Input('Enter an end date value', 'Input box') as value2_date&lt;BR /&gt;autogenerate 1;&lt;BR /&gt;&lt;BR /&gt;Let FromDate = peek('value1_date','2008/01/04','Input');&lt;BR /&gt;Let DateTo = peek('value2_date','2009/01/04','Input');&lt;BR /&gt;&lt;BR /&gt;sql&lt;BR /&gt;&lt;BR /&gt;Declare&lt;BR /&gt;@vol int,&lt;BR /&gt;@FromDate as datetime,&lt;BR /&gt;@DateTo as datetime&lt;BR /&gt;&lt;BR /&gt;Execute [dbo].[test_proc] '$(FromDate)', '$(DateTo)', @vol = @vol output&lt;BR /&gt;&lt;BR /&gt;Select @vol&lt;/P&gt;&lt;P&gt;when i refresh my appn it asks me for two input dates , but doesnt display any output...&lt;/P&gt;&lt;P&gt;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"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i was jus wondering if there is any other way to pass input parameter to SP thru qlikview&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Aug 2009 16:04:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/passing-input-parameter-to-STORED-Procedure/m-p/160656#M34862</guid>
      <dc:creator />
      <dc:date>2009-08-19T16:04:57Z</dc:date>
    </item>
  </channel>
</rss>

