<?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: Qlik View Load SQL Select Question in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Qlik-View-Load-SQL-Select-Question/m-p/983466#M957308</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The availability of the AS keyword in SQL depends on the RDBMS you are using. To avoid having to check for a particular DB type and adjust your SQL statement accordingly, do as Onno says: rename your fields in the Precending load like in:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;LOAD field1 AS A, filed AS B;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;SQL SELECT field1, field FROM Table;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 12 Nov 2015 09:25:53 GMT</pubDate>
    <dc:creator>Peter_Cammaert</dc:creator>
    <dc:date>2015-11-12T09:25:53Z</dc:date>
    <item>
      <title>Qlik View Load SQL Select Question</title>
      <link>https://community.qlik.com/t5/QlikView/Qlik-View-Load-SQL-Select-Question/m-p/983463#M957305</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;Look at below two script:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000;"&gt;&lt;STRONG&gt;Load A, B；&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000;"&gt;&lt;STRONG&gt;SQL Select field1 as A, filed as B from Table；&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The result is cannot find the filed A；&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But another one is &lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #00ff00;"&gt;Load *；&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #00ff00;"&gt;SQL Select field1 as A, filed as B from Table；&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This works, I am a bit confused why？？？&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Nov 2015 09:00:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Qlik-View-Load-SQL-Select-Question/m-p/983463#M957305</guid>
      <dc:creator />
      <dc:date>2015-11-12T09:00:48Z</dc:date>
    </item>
    <item>
      <title>Re: Qlik View Load SQL Select Question</title>
      <link>https://community.qlik.com/t5/QlikView/Qlik-View-Load-SQL-Select-Question/m-p/983464#M957306</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Don't bother about the "why". Don't rename things in your SQL to begin with &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/wink.png" /&gt;. Do them in your preceding load.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Nov 2015 09:17:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Qlik-View-Load-SQL-Select-Question/m-p/983464#M957306</guid>
      <dc:creator>oknotsen</dc:creator>
      <dc:date>2015-11-12T09:17:24Z</dc:date>
    </item>
    <item>
      <title>Re: Qlik View Load SQL Select Question</title>
      <link>https://community.qlik.com/t5/QlikView/Qlik-View-Load-SQL-Select-Question/m-p/983465#M957307</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey,&lt;/P&gt;&lt;P&gt;Do like:&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #ff0000;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;Load field1 as A, field 2 as B；&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #ff0000;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;SQL Select field1 , field2&amp;nbsp; from Table；&lt;/STRONG&gt;&lt;/SPAN&gt;&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;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Your following script works bcoz you ahve written Load * and it is loading field1 and field2 in the final table .&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit; color: #00ff00;"&gt;Load *；&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit; color: #00ff00;"&gt;SQL Select field1 as A, filed as B from Table；&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit; color: #00ff00;"&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit; color: #00ff00;"&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Nov 2015 09:21:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Qlik-View-Load-SQL-Select-Question/m-p/983465#M957307</guid>
      <dc:creator>nikhilgarg</dc:creator>
      <dc:date>2015-11-12T09:21:31Z</dc:date>
    </item>
    <item>
      <title>Re: Qlik View Load SQL Select Question</title>
      <link>https://community.qlik.com/t5/QlikView/Qlik-View-Load-SQL-Select-Question/m-p/983466#M957308</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The availability of the AS keyword in SQL depends on the RDBMS you are using. To avoid having to check for a particular DB type and adjust your SQL statement accordingly, do as Onno says: rename your fields in the Precending load like in:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;LOAD field1 AS A, filed AS B;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;SQL SELECT field1, field FROM Table;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Nov 2015 09:25:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Qlik-View-Load-SQL-Select-Question/m-p/983466#M957308</guid>
      <dc:creator>Peter_Cammaert</dc:creator>
      <dc:date>2015-11-12T09:25:53Z</dc:date>
    </item>
    <item>
      <title>Re: Qlik View Load SQL Select Question</title>
      <link>https://community.qlik.com/t5/QlikView/Qlik-View-Load-SQL-Select-Question/m-p/983467#M957309</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The reason is the &lt;A href="https://community.qlik.com/qlik-blogpost/2972"&gt;Preceding Load&lt;/A&gt; which isn't a two-step loading (load first table and from there load the second one) - it's more a kind of specialized pipe-loading in one step.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;edit: for a solution look to the answers above.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Nov 2015 11:59:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Qlik-View-Load-SQL-Select-Question/m-p/983467#M957309</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2015-11-12T11:59:30Z</dc:date>
    </item>
    <item>
      <title>Re: Qlik View Load SQL Select Question</title>
      <link>https://community.qlik.com/t5/QlikView/Qlik-View-Load-SQL-Select-Question/m-p/983468#M957310</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I can't speak for the others but in my experience both statements should work. You CAN use AS in the SQL portion, I do all the time and don't have problems. After the Load * version do you definitely get Field A in your data model?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;flipside&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Nov 2015 12:25:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Qlik-View-Load-SQL-Select-Question/m-p/983468#M957310</guid>
      <dc:creator>flipside</dc:creator>
      <dc:date>2015-11-12T12:25:38Z</dc:date>
    </item>
    <item>
      <title>Re: Qlik View Load SQL Select Question</title>
      <link>https://community.qlik.com/t5/QlikView/Qlik-View-Load-SQL-Select-Question/m-p/983469#M957311</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;yes, the sql after load * works, A is available.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Nov 2015 13:31:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Qlik-View-Load-SQL-Select-Question/m-p/983469#M957311</guid>
      <dc:creator />
      <dc:date>2015-11-12T13:31:57Z</dc:date>
    </item>
    <item>
      <title>Re: Qlik View Load SQL Select Question</title>
      <link>https://community.qlik.com/t5/QlikView/Qlik-View-Load-SQL-Select-Question/m-p/983470#M957312</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hmm, I know, but in my mind, it should be work like this, first load the SQL part, and after that Load the key word, Load part. In the blog, Preceding Load, it says,&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #f5faf0;"&gt; The fact that the SELECT statement is evaluated before the Load&lt;/SPAN&gt;. &lt;/P&gt;&lt;P&gt;So I am still very very puzzled.&lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/confused.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Nov 2015 13:37:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Qlik-View-Load-SQL-Select-Question/m-p/983470#M957312</guid>
      <dc:creator />
      <dc:date>2015-11-12T13:37:37Z</dc:date>
    </item>
    <item>
      <title>Re: Qlik View Load SQL Select Question</title>
      <link>https://community.qlik.com/t5/QlikView/Qlik-View-Load-SQL-Select-Question/m-p/983471#M957313</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Are these actual scripts or re-written examples to demonstrate the issue? It may help to post the actual script if you can.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Nov 2015 14:19:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Qlik-View-Load-SQL-Select-Question/m-p/983471#M957313</guid>
      <dc:creator>flipside</dc:creator>
      <dc:date>2015-11-12T14:19:31Z</dc:date>
    </item>
    <item>
      <title>Re: Qlik View Load SQL Select Question</title>
      <link>https://community.qlik.com/t5/QlikView/Qlik-View-Load-SQL-Select-Question/m-p/983472#M957314</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think the reason is quite similar to the topic from these posting: &lt;A href="https://community.qlik.com/message/896820"&gt;Re: SQL alias for tables in QlikView&lt;/A&gt;. It will be a question of the order how qlikview performed the various handles which belonged to a preceeding load and it seems that at this time the field A didn't yet exists.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think in this sense it's best practice not to make any transformations within the sql-part and perform all transformations within the load-parts, not only because qlikview-functions couldn't be executed from the database but also to don't mixup transformations from a maintainability point of view.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Nov 2015 15:18:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Qlik-View-Load-SQL-Select-Question/m-p/983472#M957314</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2015-11-12T15:18:39Z</dc:date>
    </item>
    <item>
      <title>Re: Qlik View Load SQL Select Question</title>
      <link>https://community.qlik.com/t5/QlikView/Qlik-View-Load-SQL-Select-Question/m-p/983473#M957315</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;is "A" or "a" available?&lt;/P&gt;&lt;P&gt;which database are you using? I tried on an Oracle dbms with ODBC and both your script works &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Nov 2015 19:12:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Qlik-View-Load-SQL-Select-Question/m-p/983473#M957315</guid>
      <dc:creator>maxgro</dc:creator>
      <dc:date>2015-11-12T19:12:12Z</dc:date>
    </item>
  </channel>
</rss>

