<?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 Add column to SQL load in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Add-column-to-SQL-load/m-p/503959#M188333</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; I am new to qlikview. I am trying to add a column to all records I am loading that identifies the source data wharehouse. In a CSV load I would just right at the end of the colmns - 'Table xxx' as SOURCE - and I would be able to query SOURCE in my visualizations. I can load the data correctly but I don't know how to add this extra column to each record.&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: blue; font-family: &amp;amp;quot;Courier New&amp;amp;quot;; font-size: 9pt;"&gt;OLEDB&lt;/SPAN&gt; &lt;STRONG style=": ; Courier New&amp;amp;quot: ; color: blue; font-size: 9pt; font-family: &amp;amp;quot;"&gt;CONNECT&lt;/STRONG&gt; &lt;SPAN style="color: blue; font-family: &amp;amp;quot;Courier New&amp;amp;quot;; font-size: 9pt;"&gt;TO&lt;/SPAN&gt; &lt;SPAN style="color: maroon; font-family: &amp;amp;quot;Courier New&amp;amp;quot;; font-size: 9pt;"&gt;[Source ID Properties (all this stuff works)]&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: &amp;amp;quot;Courier New&amp;amp;quot;; font-size: 9pt;"&gt; (&lt;/SPAN&gt;&lt;SPAN style="color: blue; font-family: &amp;amp;quot;Courier New&amp;amp;quot;; font-size: 9pt;"&gt;XPassword&lt;/SPAN&gt; &lt;SPAN style="color: blue; font-family: &amp;amp;quot;Courier New&amp;amp;quot;; font-size: 9pt;"&gt;is &lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: &amp;amp;quot;Courier New&amp;amp;quot;; font-size: 9pt;"&gt;(all this stuff works));&lt;SPAN style="color: black; font-family: &amp;amp;quot;Courier New&amp;amp;quot;; font-size: 9pt;"&gt;&lt;SPAN style="color: green; font-family: &amp;amp;quot;Courier New&amp;amp;quot;; font-size: 9pt;"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;STRONG style=": ; Courier New&amp;amp;quot: ; color: blue; font-size: 9pt; font-family: &amp;amp;quot;"&gt;SQL&lt;/STRONG&gt;&lt;/P&gt;&lt;SPAN style="color: black; font-family: &amp;amp;quot;Courier New&amp;amp;quot;; font-size: 9pt;"&gt;&lt;P&gt; SELECT&lt;BR /&gt;"Dimension_1",&lt;BR /&gt;"Dimension_2",&lt;BR /&gt;"Dimension_3",FROM "Data Source"&lt;BR /&gt;&lt;BR /&gt;where Dimension_3 = 20120101;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;How do I add a column 'Table xxx' as SOURCE to this data pull that is working ok. Where 'Table xxx' is a field I want to define in the load script.&lt;/SPAN&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;Thanks!&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 21 Jul 2013 19:24:18 GMT</pubDate>
    <dc:creator>markf1995</dc:creator>
    <dc:date>2013-07-21T19:24:18Z</dc:date>
    <item>
      <title>Add column to SQL load</title>
      <link>https://community.qlik.com/t5/QlikView/Add-column-to-SQL-load/m-p/503959#M188333</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; I am new to qlikview. I am trying to add a column to all records I am loading that identifies the source data wharehouse. In a CSV load I would just right at the end of the colmns - 'Table xxx' as SOURCE - and I would be able to query SOURCE in my visualizations. I can load the data correctly but I don't know how to add this extra column to each record.&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: blue; font-family: &amp;amp;quot;Courier New&amp;amp;quot;; font-size: 9pt;"&gt;OLEDB&lt;/SPAN&gt; &lt;STRONG style=": ; Courier New&amp;amp;quot: ; color: blue; font-size: 9pt; font-family: &amp;amp;quot;"&gt;CONNECT&lt;/STRONG&gt; &lt;SPAN style="color: blue; font-family: &amp;amp;quot;Courier New&amp;amp;quot;; font-size: 9pt;"&gt;TO&lt;/SPAN&gt; &lt;SPAN style="color: maroon; font-family: &amp;amp;quot;Courier New&amp;amp;quot;; font-size: 9pt;"&gt;[Source ID Properties (all this stuff works)]&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: &amp;amp;quot;Courier New&amp;amp;quot;; font-size: 9pt;"&gt; (&lt;/SPAN&gt;&lt;SPAN style="color: blue; font-family: &amp;amp;quot;Courier New&amp;amp;quot;; font-size: 9pt;"&gt;XPassword&lt;/SPAN&gt; &lt;SPAN style="color: blue; font-family: &amp;amp;quot;Courier New&amp;amp;quot;; font-size: 9pt;"&gt;is &lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: &amp;amp;quot;Courier New&amp;amp;quot;; font-size: 9pt;"&gt;(all this stuff works));&lt;SPAN style="color: black; font-family: &amp;amp;quot;Courier New&amp;amp;quot;; font-size: 9pt;"&gt;&lt;SPAN style="color: green; font-family: &amp;amp;quot;Courier New&amp;amp;quot;; font-size: 9pt;"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;STRONG style=": ; Courier New&amp;amp;quot: ; color: blue; font-size: 9pt; font-family: &amp;amp;quot;"&gt;SQL&lt;/STRONG&gt;&lt;/P&gt;&lt;SPAN style="color: black; font-family: &amp;amp;quot;Courier New&amp;amp;quot;; font-size: 9pt;"&gt;&lt;P&gt; SELECT&lt;BR /&gt;"Dimension_1",&lt;BR /&gt;"Dimension_2",&lt;BR /&gt;"Dimension_3",FROM "Data Source"&lt;BR /&gt;&lt;BR /&gt;where Dimension_3 = 20120101;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;How do I add a column 'Table xxx' as SOURCE to this data pull that is working ok. Where 'Table xxx' is a field I want to define in the load script.&lt;/SPAN&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;Thanks!&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 21 Jul 2013 19:24:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Add-column-to-SQL-load/m-p/503959#M188333</guid>
      <dc:creator>markf1995</dc:creator>
      <dc:date>2013-07-21T19:24:18Z</dc:date>
    </item>
    <item>
      <title>Re: Add column to SQL load</title>
      <link>https://community.qlik.com/t5/QlikView/Add-column-to-SQL-load/m-p/503960#M188334</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I guess in the case of a simple sql query, such changes can be added directly in the statement.&lt;/P&gt;&lt;P&gt;But usually a preceding load in QV will help you in any needed data transformation, for example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Table1:&lt;/P&gt;&lt;P&gt;Load field1,&lt;/P&gt;&lt;P&gt;field2,&lt;/P&gt;&lt;P&gt;field1 &amp;amp; ' | ' &amp;amp; field2 as keyfield,&lt;/P&gt;&lt;P&gt;'custom data' as customfield;&lt;/P&gt;&lt;P&gt;SQL SELECT field1, field2 FROM database;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Whenever you connect to your sql db to extract the tables, in the "script" tab, check the "Preceding Load" option so the "load" part comes automatically.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 21 Jul 2013 22:31:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Add-column-to-SQL-load/m-p/503960#M188334</guid>
      <dc:creator />
      <dc:date>2013-07-21T22:31:37Z</dc:date>
    </item>
    <item>
      <title>Re: Add column to SQL load</title>
      <link>https://community.qlik.com/t5/QlikView/Add-column-to-SQL-load/m-p/503961#M188335</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You were right I did not clearly understand the role of the preceding load. I researched your answer a bit more and found this link helpful&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="loading" href="http://qlikviewnotes.blogspot.com/2009/12/simplify-with-preceeding-load.html"&gt;http://qlikviewnotes.blogspot.com/2009/12/simplify-with-preceeding-load.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks JP for your quick help!!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Jul 2013 00:47:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Add-column-to-SQL-load/m-p/503961#M188335</guid>
      <dc:creator>markf1995</dc:creator>
      <dc:date>2013-07-22T00:47:15Z</dc:date>
    </item>
  </channel>
</rss>

