Focal Point
[Solved]Getting Null values from Left Outer Join

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/6867047216

November 11, 2011, 03:48 PM
Todd_Wallace
[Solved]Getting Null values from Left Outer Join
I am working with 2 tables that are related through a left outer join.
I am looking for the records in the first table where the join turned up a null value(the records did not exist in the second table).
I tried a where is missing, where EQ ‘’, and where EQ ’ ‘ in the second table and every time it came up with 0 records.
Does anyone know of another way to get records where the right table has no records?

e.g.
Original Table
ID C1 C2
1 record-1 data-1
2 record-2 data-2
3 record-3 data-3
4 record-4 data-4
5 record-5 data-5

Joined table
ID C1 C2 C3
1 Y record-A other-A
3 N record-C other-C
5 Y record-E other-E

JOIN LEFT_OUTER Original_Table.ID IN Original_Table TO UNIQUE Joined_Table.ID IN Joined_Table TAG J4 as J4 END

I want the report to produce all records in Original_Table that do not exist in Joined_Table.
(2,4)

This message has been edited. Last edited by: Todd_Wallace,


WebFOCUS 8.1.05
Windows-iSeries DB2, All Outputs
HTML
November 11, 2011, 04:37 PM
Dan Satchell
Prior to your JOIN, try:

SET ALL = ON


or

SET ALL = SQL


or, if you have a WHERE clause on the child instance

SET ALL = PASS



WebFOCUS 7.7.05
November 13, 2011, 02:48 PM
Waz
quote:
SET ALL = SQL



When did this come in ?


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

November 14, 2011, 10:09 AM
Todd_Wallace
SET ALL = PASS
[/QUOTE]

That worked great I had a where clause to determine if it was blank to show it.
Thanks a bunch,
Todd


WebFOCUS 8.1.05
Windows-iSeries DB2, All Outputs
HTML
November 21, 2011, 11:21 AM
ABT
quote:
Originally posted by Waz:
quote:
SET ALL = SQL



When did this come in ?


7.7.x Walter Blood did a demo of it in our WFUG last month.

- ABT


------------------------------------
WF Environment:
------------------------------------
Server/Client, ReportCaster, Dev Studio: 7.6.11
Resource Analyzer, Resource Governor, Library, Maintain, InfoAssist
OS: Windows Server 2003
Application/Web Server: Tomcat 5.5.25
Java: JDK 1.6.0_03
Authentication: LDAP, MRREALM Driver
Output: PDF, EXL2K, HTM

------------------------------------
Databases:
------------------------------------
Oracle 10g
DB2 (AS/400)
MSSQL Server 2005
Access/FoxPro
October 15, 2014, 04:48 PM
Valerie
Todd can you please post some of your code on this that is working? I have added the SET ALL = PASS above my join and it is still not working?