<?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 Loading Qlik Sense from a stored procedure with temp tables in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Loading-Qlik-Sense-from-a-stored-procedure-with-temp-tables/m-p/1313249#M28106</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="margin-bottom: .0001pt;"&gt;I am trying to pull data from a stored procedure SQL Server 2016. Everything works great until I try to pull from a stored procedure that uses temp tables. I initially thought that it was a permissions issue with the service account connecting to SQL Server but apparently there are no special permissions required to create or drop temp tables. &lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;A href="https://social.msdn.microsoft.com/Forums/sqlserver/en-US/c903a88b-1a5b-4ba7-ab3d-81156e0dec72/permission-regarding-creating-temp-tables-in-mssql-2005?forum=transactsql"&gt;https://social.msdn.microsoft.com/Forums/sqlserver/en-US/c903a88b-1a5b-4ba7-ab3d-81156e0dec72/permission-regarding-creating-temp-tables-in-mssql-2005?forum=transactsql&lt;/A&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;Additionally, I connected to the database in SSMS using the service account and was able to run the stored procedure with no issues. I suspect I could rewrite the code to use table variables on CTEs on the SQL side but this would be a huge pain since I have to pull from dozens of existing store procs with temp tables. Any help would be greatly appreciated! &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;LIB CONNECT TO 'DB0123_ABC';&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;MyTest:&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;LOAD &lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;*;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;SQL EXEC Apps_Custom_DHP.dbo.usp_MySimpleSPTest&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 28 Jul 2017 18:56:21 GMT</pubDate>
    <dc:creator>wdchristensen</dc:creator>
    <dc:date>2017-07-28T18:56:21Z</dc:date>
    <item>
      <title>Loading Qlik Sense from a stored procedure with temp tables</title>
      <link>https://community.qlik.com/t5/App-Development/Loading-Qlik-Sense-from-a-stored-procedure-with-temp-tables/m-p/1313249#M28106</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="margin-bottom: .0001pt;"&gt;I am trying to pull data from a stored procedure SQL Server 2016. Everything works great until I try to pull from a stored procedure that uses temp tables. I initially thought that it was a permissions issue with the service account connecting to SQL Server but apparently there are no special permissions required to create or drop temp tables. &lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;A href="https://social.msdn.microsoft.com/Forums/sqlserver/en-US/c903a88b-1a5b-4ba7-ab3d-81156e0dec72/permission-regarding-creating-temp-tables-in-mssql-2005?forum=transactsql"&gt;https://social.msdn.microsoft.com/Forums/sqlserver/en-US/c903a88b-1a5b-4ba7-ab3d-81156e0dec72/permission-regarding-creating-temp-tables-in-mssql-2005?forum=transactsql&lt;/A&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;Additionally, I connected to the database in SSMS using the service account and was able to run the stored procedure with no issues. I suspect I could rewrite the code to use table variables on CTEs on the SQL side but this would be a huge pain since I have to pull from dozens of existing store procs with temp tables. Any help would be greatly appreciated! &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;LIB CONNECT TO 'DB0123_ABC';&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;MyTest:&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;LOAD &lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;*;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;SQL EXEC Apps_Custom_DHP.dbo.usp_MySimpleSPTest&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Jul 2017 18:56:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Loading-Qlik-Sense-from-a-stored-procedure-with-temp-tables/m-p/1313249#M28106</guid>
      <dc:creator>wdchristensen</dc:creator>
      <dc:date>2017-07-28T18:56:21Z</dc:date>
    </item>
  </channel>
</rss>

