<?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 Using variable in from clause, numeric constant not valid in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Using-variable-in-from-clause-numeric-constant-not-valid/m-p/7761#M792052</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using a FOR EACH loop to get the same fields from different tables in a DB2 database.&lt;/P&gt;&lt;P&gt;_________&lt;/P&gt;&lt;P&gt;FOR EACH vCountry IN '1A','AT'&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;FIELD1,&lt;/P&gt;&lt;P&gt;FIELD2,&lt;/P&gt;&lt;P&gt;FIELD3,&lt;/P&gt;&lt;P&gt;FIELD4&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SQL SELECT FIELD1,&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;FIELD2,&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;FIELD3,&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;FIELD4&lt;/P&gt;&lt;P&gt;FROM $(vCountry)XXXXX.XXXX;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;NEXT vCountry;&lt;/P&gt;&lt;P&gt;___________&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;'AT' runs just fine but '1A' raises "Numeric constant 1AXXXXX.XXXX is not valid" error. I don't understand why a variable with non-numerical characters can be interpreted as a number. Is there a way to force the variable to be a string? Or any other solution to make all elements in my list be treated as strings?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind Regards,&lt;/P&gt;&lt;P&gt;Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
    <dc:creator>marcusbohman</dc:creator>
    <dc:date>2020-11-25T16:16:04Z</dc:date>
    <item>
      <title>Using variable in from clause, numeric constant not valid</title>
      <link>https://community.qlik.com/t5/QlikView/Using-variable-in-from-clause-numeric-constant-not-valid/m-p/7761#M792052</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using a FOR EACH loop to get the same fields from different tables in a DB2 database.&lt;/P&gt;&lt;P&gt;_________&lt;/P&gt;&lt;P&gt;FOR EACH vCountry IN '1A','AT'&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;FIELD1,&lt;/P&gt;&lt;P&gt;FIELD2,&lt;/P&gt;&lt;P&gt;FIELD3,&lt;/P&gt;&lt;P&gt;FIELD4&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SQL SELECT FIELD1,&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;FIELD2,&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;FIELD3,&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;FIELD4&lt;/P&gt;&lt;P&gt;FROM $(vCountry)XXXXX.XXXX;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;NEXT vCountry;&lt;/P&gt;&lt;P&gt;___________&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;'AT' runs just fine but '1A' raises "Numeric constant 1AXXXXX.XXXX is not valid" error. I don't understand why a variable with non-numerical characters can be interpreted as a number. Is there a way to force the variable to be a string? Or any other solution to make all elements in my list be treated as strings?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind Regards,&lt;/P&gt;&lt;P&gt;Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-variable-in-from-clause-numeric-constant-not-valid/m-p/7761#M792052</guid>
      <dc:creator>marcusbohman</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Using variable in from clause, numeric constant not valid</title>
      <link>https://community.qlik.com/t5/QlikView/Using-variable-in-from-clause-numeric-constant-not-valid/m-p/7762#M792053</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It´s a DB2 error message, no Qlik&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Jan 2018 12:26:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-variable-in-from-clause-numeric-constant-not-valid/m-p/7762#M792053</guid>
      <dc:creator>Clever_Anjos</dc:creator>
      <dc:date>2018-01-26T12:26:09Z</dc:date>
    </item>
    <item>
      <title>Re: Using variable in from clause, numeric constant not valid</title>
      <link>https://community.qlik.com/t5/QlikView/Using-variable-in-from-clause-numeric-constant-not-valid/m-p/7763#M792055</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you &lt;A href="https://community.qlik.com/qlik-users/21667"&gt;cleveranjos&lt;/A&gt;‌. I recognise that the error comes from DB2 but I think that a change in my QV script could avoid it. It seems to pass 'AT' as string but '1A' as numerical. Would you know any way of passing '1A' as string as well?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or do you mean that I am posting in the wrong forum?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Jan 2018 15:52:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-variable-in-from-clause-numeric-constant-not-valid/m-p/7763#M792055</guid>
      <dc:creator>marcusbohman</dc:creator>
      <dc:date>2018-01-26T15:52:16Z</dc:date>
    </item>
    <item>
      <title>Re: Using variable in from clause, numeric constant not valid</title>
      <link>https://community.qlik.com/t5/QlikView/Using-variable-in-from-clause-numeric-constant-not-valid/m-p/7764#M792057</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;As long as I can see (maybe I wrong) that SQL below would return error even into your DB2 client&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #000000;"&gt;SELECT FIELD1,&lt;/P&gt;&lt;P style="font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #000000;"&gt;FIELD2,&lt;/P&gt;&lt;P style="font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #000000;"&gt;FIELD3,&lt;/P&gt;&lt;P style="font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #000000;"&gt;FIELD4&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #000000;"&gt;FROM &lt;SPAN style="color: #000000; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;1A&lt;/SPAN&gt;XXXXX.XXXX;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Jan 2018 10:02:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-variable-in-from-clause-numeric-constant-not-valid/m-p/7764#M792057</guid>
      <dc:creator>Clever_Anjos</dc:creator>
      <dc:date>2018-01-29T10:02:13Z</dc:date>
    </item>
    <item>
      <title>Re: Using variable in from clause, numeric constant not valid</title>
      <link>https://community.qlik.com/t5/QlikView/Using-variable-in-from-clause-numeric-constant-not-valid/m-p/7765#M792058</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Marcus,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am not sure but try adding single quotes around the variable name like below,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;FOR EACH vCountry IN '1A','AT'&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;LOAD&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;FIELD1,&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;FIELD2,&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;FIELD3,&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;FIELD4;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;SQL SELECT FIELD1,&lt;/P&gt;&lt;P style="font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;FIELD2,&lt;/P&gt;&lt;P style="font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;FIELD3,&lt;/P&gt;&lt;P style="font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;FIELD4&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;FROM &lt;SPAN style="color: #ff0000;"&gt;&lt;STRONG&gt;'&lt;/STRONG&gt;&lt;/SPAN&gt;$(vCountry)&lt;SPAN style="color: #ff0000;"&gt;&lt;STRONG&gt;'&lt;/STRONG&gt;&lt;/SPAN&gt;XXXXX.XXXX;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;NEXT vCountry;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Jan 2018 10:10:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-variable-in-from-clause-numeric-constant-not-valid/m-p/7765#M792058</guid>
      <dc:creator>tamilarasu</dc:creator>
      <dc:date>2018-01-29T10:10:26Z</dc:date>
    </item>
  </channel>
</rss>

