<?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 Allowing the user to specify the date for SQL statement WHERE clause in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Allowing-the-user-to-specify-the-date-for-SQL-statement-WHERE/m-p/242474#M708308</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have the following SQL statement in my script which works fine with a hard coded date, but, is there a way to allow the user to provide the date for the WHERE clause?&amp;nbsp; Can i use a mapping table within the SQL so perhaps the user could update a mapping spreadsheet when they need to?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any ideas welcome...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code"&gt;&lt;P&gt;ODBC CONNECT TO QlikView (XUserId is TaDfPUJMJbXIWSZOfScKWQRMFTcII, XPassword is LSTEecYNJCaMDTJKFJWOFLC);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HBI_temp:&lt;/P&gt;&lt;P&gt;SELECT&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; userEmail&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,usertitle&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,userfirstname&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,userlastname&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,userid&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,dateadded&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FROM&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; tbl_Users&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WHERE&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; dateadded &amp;gt; '2011-10-02'&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt; date i would like to make more dynamic &amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&lt;/P&gt;;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HBI_Data:&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; userEmail&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; as Email&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,usertitle&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; as Title&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,userfirstname&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; as Firstname&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,userlastname&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; as Lastname&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,userid&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; as userid&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,dateadded&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; as From_Date&lt;/P&gt;&lt;P&gt;Resident&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; HBI_temp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DROP Table&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; HBI_temp;&lt;/P&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 12 Oct 2011 10:31:28 GMT</pubDate>
    <dc:creator>haymarketpaul</dc:creator>
    <dc:date>2011-10-12T10:31:28Z</dc:date>
    <item>
      <title>Allowing the user to specify the date for SQL statement WHERE clause</title>
      <link>https://community.qlik.com/t5/QlikView/Allowing-the-user-to-specify-the-date-for-SQL-statement-WHERE/m-p/242474#M708308</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have the following SQL statement in my script which works fine with a hard coded date, but, is there a way to allow the user to provide the date for the WHERE clause?&amp;nbsp; Can i use a mapping table within the SQL so perhaps the user could update a mapping spreadsheet when they need to?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any ideas welcome...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code"&gt;&lt;P&gt;ODBC CONNECT TO QlikView (XUserId is TaDfPUJMJbXIWSZOfScKWQRMFTcII, XPassword is LSTEecYNJCaMDTJKFJWOFLC);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HBI_temp:&lt;/P&gt;&lt;P&gt;SELECT&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; userEmail&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,usertitle&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,userfirstname&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,userlastname&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,userid&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,dateadded&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FROM&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; tbl_Users&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WHERE&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; dateadded &amp;gt; '2011-10-02'&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt; date i would like to make more dynamic &amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&lt;/P&gt;;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HBI_Data:&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; userEmail&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; as Email&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,usertitle&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; as Title&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,userfirstname&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; as Firstname&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,userlastname&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; as Lastname&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,userid&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; as userid&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,dateadded&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; as From_Date&lt;/P&gt;&lt;P&gt;Resident&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; HBI_temp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DROP Table&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; HBI_temp;&lt;/P&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Oct 2011 10:31:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Allowing-the-user-to-specify-the-date-for-SQL-statement-WHERE/m-p/242474#M708308</guid>
      <dc:creator>haymarketpaul</dc:creator>
      <dc:date>2011-10-12T10:31:28Z</dc:date>
    </item>
    <item>
      <title>Allowing the user to specify the date for SQL statement WHERE clause</title>
      <link>https://community.qlik.com/t5/QlikView/Allowing-the-user-to-specify-the-date-for-SQL-statement-WHERE/m-p/242475#M708309</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Hi Paul&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;QV is very happy to extract data from Excel spreadsheets (you can use a wizard when writing the script). So this would be a good option. Create a spreasheet with a (single) date in it which your user can update. You may need a little validation in the script to make sure your user has asked for a 'sensible' date.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Oct 2011 11:01:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Allowing-the-user-to-specify-the-date-for-SQL-statement-WHERE/m-p/242475#M708309</guid>
      <dc:creator>richard_chilvers</dc:creator>
      <dc:date>2011-10-12T11:01:27Z</dc:date>
    </item>
    <item>
      <title>Re: Allowing the user to specify the date for SQL statement WHERE clause</title>
      <link>https://community.qlik.com/t5/QlikView/Allowing-the-user-to-specify-the-date-for-SQL-statement-WHERE/m-p/242476#M708310</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN class="short_text" id="result_box" lang="en"&gt;&lt;SPAN class="hps"&gt;Hi. I do not understand&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;what the problem is&lt;/SPAN&gt;&lt;SPAN&gt;? Do like this/&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Oct 2011 12:31:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Allowing-the-user-to-specify-the-date-for-SQL-statement-WHERE/m-p/242476#M708310</guid>
      <dc:creator />
      <dc:date>2011-10-12T12:31:05Z</dc:date>
    </item>
    <item>
      <title>Re: Allowing the user to specify the date for SQL statement WHERE clause</title>
      <link>https://community.qlik.com/t5/QlikView/Allowing-the-user-to-specify-the-date-for-SQL-statement-WHERE/m-p/242477#M708311</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Very useful thank you - perfect for what i need to do&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Oct 2011 12:54:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Allowing-the-user-to-specify-the-date-for-SQL-statement-WHERE/m-p/242477#M708311</guid>
      <dc:creator>haymarketpaul</dc:creator>
      <dc:date>2011-10-12T12:54:36Z</dc:date>
    </item>
    <item>
      <title>Allowing the user to specify the date for SQL statement WHERE clause</title>
      <link>https://community.qlik.com/t5/QlikView/Allowing-the-user-to-specify-the-date-for-SQL-statement-WHERE/m-p/242478#M708312</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Just adding a note: there is also a system function to query the user to input a value during script execution:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;H4&gt;Input( &lt;SPAN style="font-style: italic;"&gt;str cue [, str caption]&lt;/SPAN&gt; )&lt;/H4&gt;&lt;P&gt;This function can be used in the script only and opens an input box that prompts the user for a value during the script execution. The parameters cue and caption are used as message and caption texts, respectively. The function returns the entered value. &lt;/P&gt;&lt;P&gt;The input box function returns NULL if the dialog is cancelled, closed or cannot be shown.&lt;/P&gt;&lt;H2&gt;Example:&lt;/H2&gt;&lt;P style="font-weight: bold;"&gt;Load &lt;BR /&gt;Input('Enter value', 'Input box') as v, &lt;BR /&gt;Recno () as r &lt;BR /&gt;autogenerate 3; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Stefan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Oct 2011 13:12:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Allowing-the-user-to-specify-the-date-for-SQL-statement-WHERE/m-p/242478#M708312</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2011-10-12T13:12:34Z</dc:date>
    </item>
    <item>
      <title>Allowing the user to specify the date for SQL statement WHERE clause</title>
      <link>https://community.qlik.com/t5/QlikView/Allowing-the-user-to-specify-the-date-for-SQL-statement-WHERE/m-p/242479#M708313</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Fantastic - that's exactly what i need - Thankyou&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Oct 2011 14:00:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Allowing-the-user-to-specify-the-date-for-SQL-statement-WHERE/m-p/242479#M708313</guid>
      <dc:creator>haymarketpaul</dc:creator>
      <dc:date>2011-10-12T14:00:09Z</dc:date>
    </item>
  </channel>
</rss>

