<?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: Load from MSSQL stored procedure with / without temporary table in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Load-from-MSSQL-stored-procedure-with-without-temporary-table/m-p/835686#M656601</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you very much. - The NOCOUNT does the trick...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 05 Jun 2015 13:24:51 GMT</pubDate>
    <dc:creator />
    <dc:date>2015-06-05T13:24:51Z</dc:date>
    <item>
      <title>Load from MSSQL stored procedure with / without temporary table</title>
      <link>https://community.qlik.com/t5/QlikView/Load-from-MSSQL-stored-procedure-with-without-temporary-table/m-p/835683#M656598</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #575757;"&gt;Hello Experts,&lt;/SPAN&gt;&lt;/P&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #575757;"&gt;I experienced some strange behaviour when I tried to load data from a stored procedure (MSSQL 2008 R2). My original task is a bit different, but after some analysis I was able to reduce the question to the following:&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;In which way can the definition of a stored procedure influence the results in QlikView, while the SQL-results stay the same? What exactly does the temporary table change?&lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;How to reproduce the behaviour...&lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #575757;"&gt;Step 1: define the procedure&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: Consolas;"&gt;CREATE&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Consolas;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: Consolas;"&gt;PROCEDURE&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Consolas;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #008080; font-size: 10pt; font-family: Consolas;"&gt;[dbo]&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-size: 10pt; font-family: Consolas;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #008080; font-size: 10pt; font-family: Consolas;"&gt;[SimpleExample]&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: Consolas;"&gt;as&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Consolas;"&gt; &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: Consolas;"&gt;select&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Consolas;"&gt; 1 &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: Consolas;"&gt;as&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Consolas;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #008080; font-size: 10pt; font-family: Consolas;"&gt;ID&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;Step 2: use the procedure in a qvw-load-script&lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;&lt;STRONG&gt;SQL&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; exec [dbo].[SimpleExample] ; &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;Step 3: check the result --&amp;gt; &lt;STRONG&gt;as expected&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;Step 4: modify the procedure in the following way&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: Consolas;"&gt;ALTER&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Consolas;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: Consolas;"&gt;PROCEDURE&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Consolas;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #008080; font-size: 10pt; font-family: Consolas;"&gt;[dbo]&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-size: 10pt; font-family: Consolas;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #008080; font-size: 10pt; font-family: Consolas;"&gt;[SimpleExample]&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: Consolas;"&gt;as&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Consolas;"&gt; &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: Consolas;"&gt;declare&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Consolas;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #008080; font-size: 10pt; font-family: Consolas;"&gt;@tmptab&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Consolas;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: Consolas;"&gt;table&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-size: 10pt; font-family: Consolas;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #008080; font-size: 10pt; font-family: Consolas;"&gt;ID&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Consolas;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: Consolas;"&gt;int&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-size: 10pt; font-family: Consolas;"&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: Consolas;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: Consolas;"&gt;insert&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Consolas;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: Consolas;"&gt;into&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Consolas;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #008080; font-size: 10pt; font-family: Consolas;"&gt;@tmptab&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-size: 10pt; font-family: Consolas;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #008080; font-size: 10pt; font-family: Consolas;"&gt;ID&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-size: 10pt; font-family: Consolas;"&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: Consolas;"&gt;select&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Consolas;"&gt; 1 &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: Consolas;"&gt;as&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Consolas;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #008080; font-size: 10pt; font-family: Consolas;"&gt;ID&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: Consolas;"&gt;select&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Consolas;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #008080; font-size: 10pt; font-family: Consolas;"&gt;ID&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Consolas;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: Consolas;"&gt;from&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Consolas;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #008080; font-size: 10pt; font-family: Consolas;"&gt;@tmptab&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #575757; font-size: 10pt; font-family: arial,helvetica,sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #575757; font-size: 10pt; font-family: arial,helvetica,sans-serif;"&gt;Step 5: reload the qvw&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #575757; font-size: 10pt; font-family: arial,helvetica,sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #575757; font-size: 10pt; font-family: arial,helvetica,sans-serif;"&gt;Step 6: check the result --&amp;gt; &lt;STRONG&gt;no data was found&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The results for both versions are the same, when the procedure is called via SQL Management Studio.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;According to SQL Profiler both versions are called in the exact same way.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #575757; font-size: 10pt; font-family: arial,helvetica,sans-serif;"&gt;Thank you very much in advance for explanations.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Jun 2015 12:41:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-from-MSSQL-stored-procedure-with-without-temporary-table/m-p/835683#M656598</guid>
      <dc:creator />
      <dc:date>2015-06-05T12:41:42Z</dc:date>
    </item>
    <item>
      <title>Re: Load from MSSQL stored procedure with / without temporary table</title>
      <link>https://community.qlik.com/t5/QlikView/Load-from-MSSQL-stored-procedure-with-without-temporary-table/m-p/835684#M656599</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try&lt;/P&gt;&lt;P&gt;SET NOCOUNT ON &lt;/P&gt;&lt;P&gt;inside your procedure&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Jun 2015 13:01:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-from-MSSQL-stored-procedure-with-without-temporary-table/m-p/835684#M656599</guid>
      <dc:creator>Clever_Anjos</dc:creator>
      <dc:date>2015-06-05T13:01:20Z</dc:date>
    </item>
    <item>
      <title>Re: Load from MSSQL stored procedure with / without temporary table</title>
      <link>https://community.qlik.com/t5/QlikView/Load-from-MSSQL-stored-procedure-with-without-temporary-table/m-p/835685#M656600</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Or:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Consolas; color: #0000ff;"&gt;CREATE TABLE #&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Consolas; color: #008080;"&gt;tmptab&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Consolas;"&gt; &lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Consolas; color: #808080;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Consolas; color: #008080;"&gt;ID&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Consolas;"&gt; &lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Consolas; color: #0000ff;"&gt;int&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Consolas; color: #808080;"&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #000000;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Consolas; color: #0000ff;"&gt;insert&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Consolas;"&gt; &lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Consolas; color: #0000ff;"&gt;into&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Consolas;"&gt; &lt;SPAN style="font-size: 10pt; font-style: inherit; font-weight: inherit; font-family: Consolas; color: #0000ff;"&gt;#&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-style: inherit; font-weight: inherit; font-family: Consolas; color: #008080;"&gt;tmptab&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Consolas; color: #808080;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Consolas; color: #008080;"&gt;ID&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Consolas; color: #808080;"&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #000000;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Consolas; color: #0000ff;"&gt;select&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Consolas;"&gt; 1 &lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Consolas; color: #0000ff;"&gt;as&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Consolas;"&gt; &lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Consolas; color: #008080;"&gt;ID&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #000000;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Consolas; color: #0000ff;"&gt;select&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Consolas;"&gt; &lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Consolas; color: #008080;"&gt;ID&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Consolas;"&gt; &lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Consolas; color: #0000ff;"&gt;from&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Consolas;"&gt; &lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Consolas; color: #008080;"&gt;#tmptab&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #000000;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: Consolas; color: #008080;"&gt;DROP TABLE &lt;SPAN style="font-size: 10pt; font-style: inherit; font-weight: inherit; font-family: Consolas; color: #0000ff;"&gt;#&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-style: inherit; font-weight: inherit; font-family: Consolas; color: #008080;"&gt;tmptab&lt;/SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Jun 2015 13:02:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-from-MSSQL-stored-procedure-with-without-temporary-table/m-p/835685#M656600</guid>
      <dc:creator>Clever_Anjos</dc:creator>
      <dc:date>2015-06-05T13:02:34Z</dc:date>
    </item>
    <item>
      <title>Re: Load from MSSQL stored procedure with / without temporary table</title>
      <link>https://community.qlik.com/t5/QlikView/Load-from-MSSQL-stored-procedure-with-without-temporary-table/m-p/835686#M656601</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you very much. - The NOCOUNT does the trick...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Jun 2015 13:24:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-from-MSSQL-stored-procedure-with-without-temporary-table/m-p/835686#M656601</guid>
      <dc:creator />
      <dc:date>2015-06-05T13:24:51Z</dc:date>
    </item>
  </channel>
</rss>

