<?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: Issue calling stored procedure in IF ELSE statement in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Issue-calling-stored-procedure-in-IF-ELSE-statement/m-p/1041847#M16201</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes legacy mode is enabled. We've got some loading from disk as well so we've had to enable legacy mode for the app. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 10 Mar 2016 12:54:38 GMT</pubDate>
    <dc:creator />
    <dc:date>2016-03-10T12:54:38Z</dc:date>
    <item>
      <title>Issue calling stored procedure in IF ELSE statement</title>
      <link>https://community.qlik.com/t5/App-Development/Issue-calling-stored-procedure-in-IF-ELSE-statement/m-p/1041841#M16195</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello everyone,&lt;/P&gt;&lt;P&gt;I'm working on our load script and I'm running into a problem. We're implementing incremental load and I've got to call a stored procedure in SQL, but I'm having problems putting the call into an IF ELSE. Here's the code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if $(FirstReload) = true then&lt;/P&gt;&lt;P&gt;&amp;nbsp; LOAD *;&lt;/P&gt;&lt;P&gt;&amp;nbsp; SQL EXECUTE EV_TEST;&lt;/P&gt;&lt;P&gt;else&lt;/P&gt;&lt;P&gt;&amp;nbsp; LOAD *;&lt;/P&gt;&lt;P&gt;&amp;nbsp; SQL EXECUTE EV_TEST '$(vExecTime)';&lt;/P&gt;&lt;P&gt;end if&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So what I'm seeing is when I run this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The following error occurred:&lt;/P&gt;&lt;P class="edc_error" style="padding: 0 10px; color: #595959; font-family: 'Courier New'; font-size: 15px; background: rgba(255, 38, 38, 0.2);"&gt;Script line error:&lt;/P&gt;&lt;P class="headline edc_error" style="padding: 0 10px; font-weight: bolder; color: #595959; font-family: 'Courier New'; font-size: 15px; background: rgba(255, 38, 38, 0.2);"&gt;The error occurred here:&lt;/P&gt;&lt;P class="edc_error" style="padding: 0 10px; color: #595959; font-family: 'Courier New'; font-size: 15px; background: rgba(255, 38, 38, 0.2);"&gt;else&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;So I'm not sure if I'm doing &lt;/SPAN&gt;something&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt; incorrectly with my call to load the stored procedure, or if I have some syntax wrong with my IF ELSE.&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Mar 2016 16:34:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Issue-calling-stored-procedure-in-IF-ELSE-statement/m-p/1041841#M16195</guid>
      <dc:creator />
      <dc:date>2016-03-09T16:34:55Z</dc:date>
    </item>
    <item>
      <title>Re: Issue calling stored procedure in IF ELSE statement</title>
      <link>https://community.qlik.com/t5/App-Development/Issue-calling-stored-procedure-in-IF-ELSE-statement/m-p/1041842#M16196</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Have you tried both sql statements separately without the if-then-else?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Mar 2016 08:51:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Issue-calling-stored-procedure-in-IF-ELSE-statement/m-p/1041842#M16196</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2016-03-10T08:51:50Z</dc:date>
    </item>
    <item>
      <title>Re: Issue calling stored procedure in IF ELSE statement</title>
      <link>https://community.qlik.com/t5/App-Development/Issue-calling-stored-procedure-in-IF-ELSE-statement/m-p/1041843#M16197</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Syntax looks fine, your Stored Proc, is the input param mandatory or optional, as there is no param on the first call? Hence the SQL maybe throwing the error .&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Mar 2016 09:53:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Issue-calling-stored-procedure-in-IF-ELSE-statement/m-p/1041843#M16197</guid>
      <dc:creator>paul_scotchford</dc:creator>
      <dc:date>2016-03-10T09:53:06Z</dc:date>
    </item>
    <item>
      <title>Re: Issue calling stored procedure in IF ELSE statement</title>
      <link>https://community.qlik.com/t5/App-Development/Issue-calling-stored-procedure-in-IF-ELSE-statement/m-p/1041844#M16198</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;I've ran both without the IF ELSE and they both successfully run and bring back data. When I run without the param I get a tabled called EXECUTE EV_TEST. When I run it with the param I get a table called EXECUTE EV_TEST '2016-03-10 12:36:50' and that name changes with the timestamp. Both bring back the data I'm expecting and the correct data that correlates to having or not having the parameter. &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Mar 2016 12:38:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Issue-calling-stored-procedure-in-IF-ELSE-statement/m-p/1041844#M16198</guid>
      <dc:creator />
      <dc:date>2016-03-10T12:38:08Z</dc:date>
    </item>
    <item>
      <title>Re: Issue calling stored procedure in IF ELSE statement</title>
      <link>https://community.qlik.com/t5/App-Development/Issue-calling-stored-procedure-in-IF-ELSE-statement/m-p/1041845#M16199</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The input param is optional. We pass nothing over if it's the first time we're loading data and we want to pass the whole set back to qlik. We pass the parameter if it's not the first load so we can get incremental data. I can run both in SQL and both return data to qlik. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Mar 2016 12:39:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Issue-calling-stored-procedure-in-IF-ELSE-statement/m-p/1041845#M16199</guid>
      <dc:creator />
      <dc:date>2016-03-10T12:39:39Z</dc:date>
    </item>
    <item>
      <title>Re: Issue calling stored procedure in IF ELSE statement</title>
      <link>https://community.qlik.com/t5/App-Development/Issue-calling-stored-procedure-in-IF-ELSE-statement/m-p/1041846#M16200</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Since you're using variables... did you enable Legacy Mode? See: &lt;A href="https://community.qlik.com/qlik-blogpost/4294"&gt;Qlik Sense Legacy mode&lt;/A&gt; and&amp;nbsp; &lt;A href="http://help.qlik.com/en-US/sense/2.1/Subsystems/Hub/Content/LoadData/disable-standard-mode.htm" title="http://help.qlik.com/en-US/sense/2.1/Subsystems/Hub/Content/LoadData/disable-standard-mode.htm"&gt;Disabling standard mode ‒ Qlik Sense&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Mar 2016 12:51:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Issue-calling-stored-procedure-in-IF-ELSE-statement/m-p/1041846#M16200</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2016-03-10T12:51:05Z</dc:date>
    </item>
    <item>
      <title>Re: Issue calling stored procedure in IF ELSE statement</title>
      <link>https://community.qlik.com/t5/App-Development/Issue-calling-stored-procedure-in-IF-ELSE-statement/m-p/1041847#M16201</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes legacy mode is enabled. We've got some loading from disk as well so we've had to enable legacy mode for the app. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Mar 2016 12:54:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Issue-calling-stored-procedure-in-IF-ELSE-statement/m-p/1041847#M16201</guid>
      <dc:creator />
      <dc:date>2016-03-10T12:54:38Z</dc:date>
    </item>
    <item>
      <title>Re: Issue calling stored procedure in IF ELSE statement</title>
      <link>https://community.qlik.com/t5/App-Development/Issue-calling-stored-procedure-in-IF-ELSE-statement/m-p/1041848#M16202</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Curious. I'm afraid I don't know what's wrong. Can you try it in Qlikview too? Maybe you can generate a log file with more information that way.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or try replacing one branch of the if statement with some code that can't fail: TRACE $(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;FirstReload&lt;/SPAN&gt;)&amp;nbsp; $(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;vExecTime&lt;/SPAN&gt;); &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Mar 2016 13:29:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Issue-calling-stored-procedure-in-IF-ELSE-statement/m-p/1041848#M16202</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2016-03-10T13:29:09Z</dc:date>
    </item>
  </channel>
</rss>

