<?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 Merge 2 tables with same field names in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Merge-2-tables-with-same-field-names/m-p/148542#M26819</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="font-weight: bold"&gt;&lt;/P&gt;&lt;P style="font-weight: bold"&gt;Hi all,&lt;/P&gt;&lt;P style="font-weight: bold"&gt;The script below is working well, but what script do I need when 2 fields, in different tables, has the same name? For example: customers.description and orders.description. Both descriptions I need.&lt;/P&gt;&lt;P style="font-weight: bold"&gt;&lt;/P&gt;&lt;B&gt;&lt;/B&gt;&lt;P style="font-weight: bold"&gt;LOAD&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;P&gt;CustomerID, OrderID, OrderDate, EmployeeID, ShipperID, CompanyName, Freight;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P style="font-weight: bold"&gt;&lt;/P&gt;&lt;P style="font-weight: bold"&gt;SQL&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;B&gt;Select&lt;/B&gt; *&lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt; &lt;P style="font-weight: bold"&gt;FROM&lt;/P&gt;&lt;P&gt;Customers, Orders, Shippers&lt;/P&gt;&lt;P&gt;WHERE&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;Customers.CustomerID=Orders.CustomerID&lt;/P&gt;&lt;P&gt;AND&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;Shippers.ShipperID=Orders.ShipperID;&lt;/P&gt;&lt;P&gt;Thanks in advance,&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Arjan IJlenhave&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 06 Jul 2009 15:50:21 GMT</pubDate>
    <dc:creator />
    <dc:date>2009-07-06T15:50:21Z</dc:date>
    <item>
      <title>Merge 2 tables with same field names</title>
      <link>https://community.qlik.com/t5/QlikView/Merge-2-tables-with-same-field-names/m-p/148542#M26819</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="font-weight: bold"&gt;&lt;/P&gt;&lt;P style="font-weight: bold"&gt;Hi all,&lt;/P&gt;&lt;P style="font-weight: bold"&gt;The script below is working well, but what script do I need when 2 fields, in different tables, has the same name? For example: customers.description and orders.description. Both descriptions I need.&lt;/P&gt;&lt;P style="font-weight: bold"&gt;&lt;/P&gt;&lt;B&gt;&lt;/B&gt;&lt;P style="font-weight: bold"&gt;LOAD&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;P&gt;CustomerID, OrderID, OrderDate, EmployeeID, ShipperID, CompanyName, Freight;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P style="font-weight: bold"&gt;&lt;/P&gt;&lt;P style="font-weight: bold"&gt;SQL&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;B&gt;Select&lt;/B&gt; *&lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt; &lt;P style="font-weight: bold"&gt;FROM&lt;/P&gt;&lt;P&gt;Customers, Orders, Shippers&lt;/P&gt;&lt;P&gt;WHERE&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;Customers.CustomerID=Orders.CustomerID&lt;/P&gt;&lt;P&gt;AND&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;Shippers.ShipperID=Orders.ShipperID;&lt;/P&gt;&lt;P&gt;Thanks in advance,&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Arjan IJlenhave&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Jul 2009 15:50:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Merge-2-tables-with-same-field-names/m-p/148542#M26819</guid>
      <dc:creator />
      <dc:date>2009-07-06T15:50:21Z</dc:date>
    </item>
    <item>
      <title>AW:Merge 2 tables with same field names</title>
      <link>https://community.qlik.com/t5/QlikView/Merge-2-tables-with-same-field-names/m-p/148543#M26820</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;1. You can rename the fields with "AS":&lt;/P&gt;&lt;P&gt;LOAD customers.description AS desc1,&lt;/P&gt;&lt;P&gt;orders.description AS desc2;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. You can "qualify" all fields:&lt;/P&gt;&lt;P&gt;QUALIFY *;&lt;/P&gt;&lt;P&gt;LOAD description,*;&lt;/P&gt;&lt;P&gt;SELECT * FROM customers;&lt;/P&gt;&lt;P&gt;LOAD description,*;&lt;/P&gt;&lt;P&gt;SELECT * FROM orders;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Greetz&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Jul 2009 15:57:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Merge-2-tables-with-same-field-names/m-p/148543#M26820</guid>
      <dc:creator />
      <dc:date>2009-07-06T15:57:26Z</dc:date>
    </item>
    <item>
      <title>Merge 2 tables with same field names</title>
      <link>https://community.qlik.com/t5/QlikView/Merge-2-tables-with-same-field-names/m-p/148544#M26821</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks, but now I got een error 'Field not found - &amp;lt;Customers.CustomerID&amp;gt;'&lt;/P&gt;&lt;P&gt;The script:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-weight: bold"&gt;&lt;/P&gt;&lt;P style="font-weight: bold"&gt;LOAD&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;P&gt;Customers.CustomerID &lt;B&gt;as&lt;/B&gt; CustIDCus,&lt;/P&gt;&lt;P&gt;Orders.CustomerID&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;B&gt;as&lt;/B&gt; CustIDOrd, &lt;P&gt;OrderID&lt;/P&gt;&lt;P&gt;&lt;/P&gt;, &lt;P&gt;OrderDate&lt;/P&gt;&lt;P&gt;&lt;/P&gt;, &lt;P&gt;EmployeeID&lt;/P&gt;&lt;P&gt;&lt;/P&gt;, &lt;P&gt;ShipperID&lt;/P&gt;&lt;P&gt;&lt;/P&gt;, &lt;P&gt;CompanyName&lt;/P&gt;&lt;P&gt;&lt;/P&gt;, &lt;P&gt;Freight;&lt;/P&gt;&lt;B&gt;&lt;/B&gt;&lt;P style="font-weight: bold"&gt;SQL&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;B&gt;Select&lt;/B&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-weight: bold"&gt;&lt;/P&gt;&lt;P style="font-weight: bold"&gt;FROM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;Customers, &lt;P&gt;Orders,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Shippers&lt;/P&gt;&lt;P&gt;WHERE&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;P&gt;Customers.CustomerID=Orders.CustomerID&lt;/P&gt;&lt;P&gt;AND&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;P&gt;Shippers.ShipperID=Orders.ShipperID;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Jul 2009 16:09:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Merge-2-tables-with-same-field-names/m-p/148544#M26821</guid>
      <dc:creator />
      <dc:date>2009-07-06T16:09:29Z</dc:date>
    </item>
    <item>
      <title>Merge 2 tables with same field names</title>
      <link>https://community.qlik.com/t5/QlikView/Merge-2-tables-with-same-field-names/m-p/148545#M26822</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Try using &lt;B&gt;exists()&lt;/B&gt; function in where clause.&lt;/P&gt;&lt;P style="font-weight: bold"&gt;- Sridhar&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Jul 2009 16:16:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Merge-2-tables-with-same-field-names/m-p/148545#M26822</guid>
      <dc:creator />
      <dc:date>2009-07-06T16:16:20Z</dc:date>
    </item>
    <item>
      <title>AW:Re: Merge 2 tables with same field names</title>
      <link>https://community.qlik.com/t5/QlikView/Merge-2-tables-with-same-field-names/m-p/148546#M26823</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try joining the tables via QV script and not in SQL:&lt;/P&gt;&lt;P&gt;QUALIFY *;&lt;BR /&gt;UNQUALIFY '%*';&lt;/P&gt;&lt;P&gt;Customers:&lt;BR /&gt;LOAD CustomerID AS %CUSTOMERID%,&lt;BR /&gt; *;&lt;BR /&gt;SQL SELECT * FROM Customers;&lt;/P&gt;&lt;P&gt;Orders:&lt;BR /&gt;LOAD CustomerID AS %CUSTOMERID%,&lt;BR /&gt; ShipperID AS %SHIPPERID,&lt;BR /&gt; *;&lt;BR /&gt;SQL SELECT * FROM Orders;&lt;/P&gt;&lt;P&gt;Shippers:&lt;BR /&gt;LOAD ShipperID AS %SHIPPERID%,&lt;BR /&gt; *;&lt;BR /&gt;SQL SELECT * FROM Shippers;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Jul 2009 16:18:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Merge-2-tables-with-same-field-names/m-p/148546#M26823</guid>
      <dc:creator />
      <dc:date>2009-07-06T16:18:32Z</dc:date>
    </item>
    <item>
      <title>AW:Re: Merge 2 tables with same field names</title>
      <link>https://community.qlik.com/t5/QlikView/Merge-2-tables-with-same-field-names/m-p/148547#M26824</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok, but I got een sql query with all the joins in it.&lt;/P&gt;&lt;P&gt;Is it possible to use a sql query in Qlikview or is it better to redesign it?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Jul 2009 16:28:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Merge-2-tables-with-same-field-names/m-p/148547#M26824</guid>
      <dc:creator />
      <dc:date>2009-07-06T16:28:37Z</dc:date>
    </item>
    <item>
      <title>AW:Re: AW:Re: Merge 2 tables with same field names</title>
      <link>https://community.qlik.com/t5/QlikView/Merge-2-tables-with-same-field-names/m-p/148548#M26825</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, it is possible to use complex SQL statements in QV script. You can use anything the ODBC driver does support.&lt;/P&gt;&lt;P&gt;And yes, it is better to keep the SQL script simple and to load only the base tables.&lt;/P&gt;&lt;P&gt;Otherwise you will load the tables &amp;lt;xx&amp;gt; times instead of only one time! &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;&lt;P&gt;But it depends...&lt;/P&gt;&lt;P&gt;Greetz&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Jul 2009 16:38:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Merge-2-tables-with-same-field-names/m-p/148548#M26825</guid>
      <dc:creator />
      <dc:date>2009-07-06T16:38:14Z</dc:date>
    </item>
  </channel>
</rss>

