<?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: Selecting variables when executing stored procedure in script in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Selecting-variables-when-executing-stored-procedure-in-script/m-p/492549#M693338</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Perhaps something like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LET vFromDt = If('$(vFactoP)'='MOH', '$(vFromDt2)', '$(vFromDt)' ;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Measure_Temp:&lt;/P&gt;&lt;P&gt;SQL EXEC mtzcus_ActiveMedList_60 '$(vFactoP)','$(vFromDt)' ,'$(vToDt)','N';&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 17 Jul 2013 18:33:53 GMT</pubDate>
    <dc:creator>Gysbert_Wassenaar</dc:creator>
    <dc:date>2013-07-17T18:33:53Z</dc:date>
    <item>
      <title>Selecting variables when executing stored procedure in script</title>
      <link>https://community.qlik.com/t5/QlikView/Selecting-variables-when-executing-stored-procedure-in-script/m-p/492548#M693337</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Im trying to select variables and alternate variables into parameters while executing a stored procedure in SQL via my qlikview script. What is the proper syntax for stating an alternate variable?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif; font-size: 10pt;"&gt;this is the original statment&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif; font-size: 10pt;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Measure_Temp:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;STRONG style="color: #0000ff;"&gt;&lt;STRONG style="color: #0000ff;"&gt;SQL E&lt;/STRONG&gt;&lt;/STRONG&gt;XEC mtzcus_ActiveMedList_60 '$(vFactoP)', '$(vFromDt)', '$(vToDt)','N'; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;SPAN style="font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif; font-size: 10pt;"&gt;I would like to replace 'vFromDt' with 'vFromDt2' when' vFactoP'='MOH'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;I tried this, but it didnt work:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Measure_Temp:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;SQL EXEC mtzcus_ActiveMedList_60 '$(vFactoP)', If((vFactoP='MOH')'$(vFromDt2)')'$(vFromDt)', '$(vToDt)','N'; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif; font-size: 10pt;"&gt;Any help is appreciated..&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif; font-size: 10pt;"&gt;thanks&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif; font-size: 10pt;"&gt;Beth&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Jul 2013 18:05:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Selecting-variables-when-executing-stored-procedure-in-script/m-p/492548#M693337</guid>
      <dc:creator>bcraymond</dc:creator>
      <dc:date>2013-07-17T18:05:28Z</dc:date>
    </item>
    <item>
      <title>Re: Selecting variables when executing stored procedure in script</title>
      <link>https://community.qlik.com/t5/QlikView/Selecting-variables-when-executing-stored-procedure-in-script/m-p/492549#M693338</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Perhaps something like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LET vFromDt = If('$(vFactoP)'='MOH', '$(vFromDt2)', '$(vFromDt)' ;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Measure_Temp:&lt;/P&gt;&lt;P&gt;SQL EXEC mtzcus_ActiveMedList_60 '$(vFactoP)','$(vFromDt)' ,'$(vToDt)','N';&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Jul 2013 18:33:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Selecting-variables-when-executing-stored-procedure-in-script/m-p/492549#M693338</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2013-07-17T18:33:53Z</dc:date>
    </item>
    <item>
      <title>Re: Selecting variables when executing stored procedure in script</title>
      <link>https://community.qlik.com/t5/QlikView/Selecting-variables-when-executing-stored-procedure-in-script/m-p/492550#M693339</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If I use $(vFactoP) in the statement:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LET vFromDt = If('$(vFactoP)'='MOH', '$(vFromDt2)', '$(vFromDt)'&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;The script interprets as&amp;nbsp; (each variable in vFactoP = 'MOH')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I use vFactoP without the dollar sign, it makes all vFactoP values use vFromDt2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I cant seem to get the script to understand to apply vFromDt2 only when vFactoP = 'MOH'&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Jul 2013 15:03:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Selecting-variables-when-executing-stored-procedure-in-script/m-p/492550#M693339</guid>
      <dc:creator>bcraymond</dc:creator>
      <dc:date>2013-07-18T15:03:18Z</dc:date>
    </item>
  </channel>
</rss>

