<?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 Re: Execute stored procedure with parameters in Connectivity &amp; Data Prep</title>
    <link>https://community.qlik.com/t5/Connectivity-Data-Prep/Execute-stored-procedure-with-parameters/m-p/1630184#M4425</link>
    <description>Hi &lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/22488"&gt;@NadiaB&lt;/a&gt;,&lt;BR /&gt;&lt;BR /&gt;I am trying read the data from stored procedure, it has 3 input parameters. I wrote the sql script as below in qlik sense. The qlik sense load is went successful but I don't see any actual data loaded into qlik sense.&lt;BR /&gt;&lt;BR /&gt;Am I missing anything here? Any help would be appreciated.&lt;BR /&gt;&lt;BR /&gt;I used OLEDB connection here.&lt;BR /&gt;&lt;BR /&gt;Data:&lt;BR /&gt;Load *;&lt;BR /&gt;SQL Exec InfDB_QA.dbo.spReport_Results&lt;BR /&gt;@TemplateId = 232&lt;BR /&gt;,@StartDate = '8/11/2019'&lt;BR /&gt;,@FinishDate = '9/15/2019'&lt;BR /&gt;;&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;&lt;BR /&gt;Anil</description>
    <pubDate>Tue, 01 Oct 2019 17:31:25 GMT</pubDate>
    <dc:creator>Anilb1603</dc:creator>
    <dc:date>2019-10-01T17:31:25Z</dc:date>
    <item>
      <title>Execute stored procedure with parameters</title>
      <link>https://community.qlik.com/t5/Connectivity-Data-Prep/Execute-stored-procedure-with-parameters/m-p/1627007#M4404</link>
      <description>&lt;P&gt;Hi Guys,&lt;/P&gt;&lt;P&gt;I have a stored procedure in Sql Server with 3 input parameters. I want to get all the data into qlik sense at once instead of going in a loop model providing input parameters every time. Is there a way to do this?&lt;/P&gt;&lt;P&gt;Do we have something like * we can supply as a parameter to get all the data at once? If not, Is there any alternate solutions available??&lt;/P&gt;&lt;P&gt;Any help would be appreciated.&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Anil&lt;/P&gt;</description>
      <pubDate>Mon, 23 Sep 2019 15:15:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Connectivity-Data-Prep/Execute-stored-procedure-with-parameters/m-p/1627007#M4404</guid>
      <dc:creator>Anilb1603</dc:creator>
      <dc:date>2019-09-23T15:15:40Z</dc:date>
    </item>
    <item>
      <title>Re: Execute stored procedure with parameters</title>
      <link>https://community.qlik.com/t5/Connectivity-Data-Prep/Execute-stored-procedure-with-parameters/m-p/1627054#M4405</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/76258"&gt;@Anilb1603&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;We have an article that can help, it was written for QLikView but the syntax works for Qlik Sense too:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://support.qlik.com/articles/000002490" target="_self"&gt;Calling a Stored Procedure in Microsoft SQL Server from QlikView&lt;/A&gt;&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt;"&gt;We encourage our customers to visit our Knowledge Base &lt;A href="https://qliksupport.force.com/QS_CoveoSearch" target="_blank"&gt;https://qliksupport.force.com/QS_CoveoSearch&lt;/A&gt; when trying to find a solution related and not limited to: errors, feature requests, product defects. You can also visit our Qlik Help portal &lt;A href="https://help.qlik.com/" target="_blank"&gt;https://help.qlik.com/ &lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 23 Sep 2019 16:45:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Connectivity-Data-Prep/Execute-stored-procedure-with-parameters/m-p/1627054#M4405</guid>
      <dc:creator>NadiaB</dc:creator>
      <dc:date>2019-09-23T16:45:58Z</dc:date>
    </item>
    <item>
      <title>Re: Execute stored procedure with parameters</title>
      <link>https://community.qlik.com/t5/Connectivity-Data-Prep/Execute-stored-procedure-with-parameters/m-p/1627082#M4406</link>
      <description>&lt;P&gt;Thank you&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/22488"&gt;@NadiaB&lt;/a&gt; for quick reply.&lt;/P&gt;&lt;P&gt;The instructions are not clear in that link. Can you please explain with some example if possible??&lt;/P&gt;&lt;P&gt;Below script is there in that link.&lt;/P&gt;&lt;DIV&gt;&lt;U&gt;&lt;SPAN&gt;Executing a stored procedure with input / output parameters&lt;/SPAN&gt;&lt;/U&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;EM&gt;SQL&lt;BR /&gt;declare @var3 int&lt;BR /&gt;execute sp_myProcedure 5,3, @var3 output&lt;BR /&gt;Select @var3 as result;&lt;/EM&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;U&gt;&lt;SPAN&gt;Executing a stored procedure returning a result set&lt;/SPAN&gt;&lt;/U&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;EM&gt;SQL Execute CustOrderHist 'CustomerNo';&lt;/EM&gt;&lt;/DIV&gt;</description>
      <pubDate>Mon, 23 Sep 2019 18:01:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Connectivity-Data-Prep/Execute-stored-procedure-with-parameters/m-p/1627082#M4406</guid>
      <dc:creator>Anilb1603</dc:creator>
      <dc:date>2019-09-23T18:01:54Z</dc:date>
    </item>
    <item>
      <title>Re: Execute stored procedure with parameters</title>
      <link>https://community.qlik.com/t5/Connectivity-Data-Prep/Execute-stored-procedure-with-parameters/m-p/1627140#M4407</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/76258"&gt;@Anilb1603&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So basically you can create a store procedure that retrieves a data set (select (*) from table) or a stored procedure that returns a values using variables (OUTPUT VARIABLE)&lt;/P&gt;
&lt;P&gt;NOTE: For this examples Microsoft AdventureWork2017 demo DB was used:&lt;/P&gt;
&lt;P&gt;1)&lt;/P&gt;
&lt;P&gt;Stored Procedure:&lt;/P&gt;
&lt;P&gt;USE [AdventureWorks2017]&lt;BR /&gt;GO&lt;BR /&gt;CREATE PROCEDURE [dbo].[uspGetProductsByColor]&lt;BR /&gt;@Color varchar(15)&lt;BR /&gt;AS&lt;BR /&gt;BEGIN&lt;BR /&gt;SELECT * &lt;BR /&gt;FROM [Production].[Product]&lt;BR /&gt;WHERE Color= @Color;&lt;BR /&gt;END;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Call from Qlik Sense:&lt;/P&gt;
&lt;P&gt;LIB CONNECT TO 'ODBC_AdventureWorks';&lt;/P&gt;
&lt;P&gt;SQL Execute uspGetProductsByColor 'Silver';&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;2)&lt;/P&gt;
&lt;P&gt;USE [AdventureWorks2017]&lt;BR /&gt;GO&lt;BR /&gt;CREATE PROCEDURE [dbo].[uspGetProductName]&lt;BR /&gt;@ProductID [int],&lt;BR /&gt;@Name varchar(50) OUTPUT&lt;BR /&gt;AS&lt;BR /&gt;BEGIN&lt;BR /&gt;SELECT Name&lt;BR /&gt;from [Production].[Product] p &lt;BR /&gt;WHERE p.ProductID = @ProductID&lt;BR /&gt;END;&lt;/P&gt;
&lt;P&gt;Call from Sense (you can send it to a table or to a variable):&lt;/P&gt;
&lt;P&gt;LIB CONNECT TO 'ODBC_AdventureWorks';&lt;/P&gt;
&lt;P&gt;ProductName:&lt;BR /&gt;SQL declare @Name varchar(50)&lt;BR /&gt;execute uspGetProductName 476, @Name output&lt;BR /&gt;select @Name;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope it helps!!&lt;/P&gt;</description>
      <pubDate>Mon, 23 Sep 2019 20:21:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Connectivity-Data-Prep/Execute-stored-procedure-with-parameters/m-p/1627140#M4407</guid>
      <dc:creator>NadiaB</dc:creator>
      <dc:date>2019-09-23T20:21:51Z</dc:date>
    </item>
    <item>
      <title>Re: Execute stored procedure with parameters</title>
      <link>https://community.qlik.com/t5/Connectivity-Data-Prep/Execute-stored-procedure-with-parameters/m-p/1627489#M4410</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/22488"&gt;@NadiaB&lt;/a&gt;&amp;nbsp;for helping me out.&lt;/P&gt;&lt;P&gt;Your example is clear now but In my case I have input parameters only. I do not have any output parameters.&lt;/P&gt;&lt;P&gt;And In your example, when you supplied 476 as a input parameter for Product Id how it would retrieve all the product Name values from underneath table. I believe it will retrieve product name for Id 476 only.&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;ProductName:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;SQL declare @Name varchar(50)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;execute uspGetProductName 476, @Name output&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;select @Name;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;My requirement is to get all the product names into qlik sense at once. I am looking for a solution something like where I can supply Product Id = '*' and get all the product names into qlik sense at once.&lt;/P&gt;&lt;P&gt;Please let me know if any solutions available for my requirement.&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Anil&lt;/P&gt;</description>
      <pubDate>Tue, 24 Sep 2019 13:49:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Connectivity-Data-Prep/Execute-stored-procedure-with-parameters/m-p/1627489#M4410</guid>
      <dc:creator>Anilb1603</dc:creator>
      <dc:date>2019-09-24T13:49:29Z</dc:date>
    </item>
    <item>
      <title>Re: Execute stored procedure with parameters</title>
      <link>https://community.qlik.com/t5/Connectivity-Data-Prep/Execute-stored-procedure-with-parameters/m-p/1630184#M4425</link>
      <description>Hi &lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/22488"&gt;@NadiaB&lt;/a&gt;,&lt;BR /&gt;&lt;BR /&gt;I am trying read the data from stored procedure, it has 3 input parameters. I wrote the sql script as below in qlik sense. The qlik sense load is went successful but I don't see any actual data loaded into qlik sense.&lt;BR /&gt;&lt;BR /&gt;Am I missing anything here? Any help would be appreciated.&lt;BR /&gt;&lt;BR /&gt;I used OLEDB connection here.&lt;BR /&gt;&lt;BR /&gt;Data:&lt;BR /&gt;Load *;&lt;BR /&gt;SQL Exec InfDB_QA.dbo.spReport_Results&lt;BR /&gt;@TemplateId = 232&lt;BR /&gt;,@StartDate = '8/11/2019'&lt;BR /&gt;,@FinishDate = '9/15/2019'&lt;BR /&gt;;&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;&lt;BR /&gt;Anil</description>
      <pubDate>Tue, 01 Oct 2019 17:31:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Connectivity-Data-Prep/Execute-stored-procedure-with-parameters/m-p/1630184#M4425</guid>
      <dc:creator>Anilb1603</dc:creator>
      <dc:date>2019-10-01T17:31:25Z</dc:date>
    </item>
    <item>
      <title>Re: Execute stored procedure with parameters</title>
      <link>https://community.qlik.com/t5/Connectivity-Data-Prep/Execute-stored-procedure-with-parameters/m-p/1990501#M11465</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/76258"&gt;@Anilb1603&lt;/a&gt;&amp;nbsp; hope you are doing good, i am also going through the same issue as yours and am yet to get a solution to it, please can you let me know if you were able to find a solution to yours? and if yes , how did you go about it? your prompt response will be well appreciated. thank you so much.&lt;/P&gt;</description>
      <pubDate>Sun, 09 Oct 2022 17:18:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Connectivity-Data-Prep/Execute-stored-procedure-with-parameters/m-p/1990501#M11465</guid>
      <dc:creator>bisola1</dc:creator>
      <dc:date>2022-10-09T17:18:39Z</dc:date>
    </item>
  </channel>
</rss>

