<?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 Full outer join does not work when table 1 is empty in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Full-outer-join-does-not-work-when-table-1-is-empty/m-p/1669177#M594258</link>
    <description>&lt;P&gt;Hello Community,&lt;/P&gt;&lt;P&gt;I am using the below table to get some data.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;	select distinct
        nvl(a.key1,b.key1) as key1,
        nvl(a.key2,b.key2) as key2,
        nvl(a.key3,b.key3) as key3,
        a.data1
	b.data2
        from
        a
        Full Outer join
        b on
        a.key1=b.key1
	and a.key2=b.key2
        and a.key3=b.key3
        and b.indicator='O'
        and b.key1=25 and b.key2=3
        where
        and a.indicator='P'
        and a.key1=25 and a.key2=3
        order by nvl(a.key3,b.key3)&lt;/LI-CODE&gt;&lt;P&gt;now this does not result in any data as table a is empty(No data for indicator P) but table b has data for indicator O.&lt;/P&gt;&lt;P&gt;What I wanted to do with this query is get the data, for cases where table a is empty, from table b and vice-versa and when both have data then two rows.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you guys let me know what I am doing wrong here?&lt;/P&gt;&lt;P&gt;Thank you very much&lt;/P&gt;</description>
    <pubDate>Sat, 16 Nov 2024 19:13:53 GMT</pubDate>
    <dc:creator>baliyan_vinay</dc:creator>
    <dc:date>2024-11-16T19:13:53Z</dc:date>
    <item>
      <title>Full outer join does not work when table 1 is empty</title>
      <link>https://community.qlik.com/t5/QlikView/Full-outer-join-does-not-work-when-table-1-is-empty/m-p/1669177#M594258</link>
      <description>&lt;P&gt;Hello Community,&lt;/P&gt;&lt;P&gt;I am using the below table to get some data.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;	select distinct
        nvl(a.key1,b.key1) as key1,
        nvl(a.key2,b.key2) as key2,
        nvl(a.key3,b.key3) as key3,
        a.data1
	b.data2
        from
        a
        Full Outer join
        b on
        a.key1=b.key1
	and a.key2=b.key2
        and a.key3=b.key3
        and b.indicator='O'
        and b.key1=25 and b.key2=3
        where
        and a.indicator='P'
        and a.key1=25 and a.key2=3
        order by nvl(a.key3,b.key3)&lt;/LI-CODE&gt;&lt;P&gt;now this does not result in any data as table a is empty(No data for indicator P) but table b has data for indicator O.&lt;/P&gt;&lt;P&gt;What I wanted to do with this query is get the data, for cases where table a is empty, from table b and vice-versa and when both have data then two rows.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you guys let me know what I am doing wrong here?&lt;/P&gt;&lt;P&gt;Thank you very much&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 19:13:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Full-outer-join-does-not-work-when-table-1-is-empty/m-p/1669177#M594258</guid>
      <dc:creator>baliyan_vinay</dc:creator>
      <dc:date>2024-11-16T19:13:53Z</dc:date>
    </item>
    <item>
      <title>Re: Full outer join does not work when table 1 is empty</title>
      <link>https://community.qlik.com/t5/QlikView/Full-outer-join-does-not-work-when-table-1-is-empty/m-p/1669240#M594259</link>
      <description>&lt;P&gt;What you are asking about is in SQL syntax, you might find better help searching SQL forums.&lt;/P&gt;&lt;P&gt;However, Qlik will perform the desired join if&amp;nbsp; you keep the join inside Qlik and not using SQL syntax. You could probably do something like this:&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier" size="2"&gt;a:&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;SQL SELECT *&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;FROM a;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier" size="2"&gt;b:&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;LOAD * ;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;SQL SELECT *&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;FROM b;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier" size="2"&gt;JOIN (b)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;Load *&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;Resident a;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier" size="2"&gt;Drop table a;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 26 Jan 2020 23:04:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Full-outer-join-does-not-work-when-table-1-is-empty/m-p/1669240#M594259</guid>
      <dc:creator>Vegar</dc:creator>
      <dc:date>2020-01-26T23:04:29Z</dc:date>
    </item>
  </channel>
</rss>

