Focal Point Banner
Community Center Education Summit Technical Support User Groups
Let's Get Social!

Facebook Twitter LinkedIn YouTube
Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] Join not working
Go
New
Search
Notify
Tools
Reply
  
[SOLVED] Join not working
 Login/Join
 
Platinum Member
posted
I have a simple inner join between two table that isn't working. Table A has various year values, e.g. 2011, 2015, 2012, etc. Table B has only one value, 2015. When I do an Inner Join between these two tables I expect to get only the 2015 records out of Table A; however, I'm getting everything.

Now, If I add the Table B field to my report, then I get only 2015 items.

The report only works correctly if I add the field from Table B or I add a WHERE statement. I thought the Inner Join would have negated the need for the WHERE statement. Why doesn't it?

Tony

This message has been edited. Last edited by: <Kathryn Henning>,


WebFOCUS 8.1.05
Windows, All Outputs
 
Posts: 118 | Location: Birmingham, Al | Registered: July 23, 2015Reply With QuoteReport This Post
Virtuoso
posted Hide Post
Reverse your JOIN.

The way it works in FOCUS is not the same as a SQL Join.

Instead of (which you probably did):
JOIN
 INNER field IN TableA
    TO field IN TableB Tag J1 AS J1
END


Consider:
JOIN
 INNER field IN TableB
    TO field IN TableA Tag J1 AS J1
END


Join Child to Parent instead of Parent to Child.

In a JOIN, if you do not include any field from the joined table in your TABLE FILE...END it's like having no join for Focus.


WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007
 
Posts: 2347 | Location: Montreal Area, Qc, CA | Registered: September 25, 2013Reply With QuoteReport This Post
Platinum Member
posted Hide Post
Hey MartinY,
I found a reference to something in IB Tech support (hottrack 60642543) that says if there isn't a file used in Table B then WebFOCUS won't recognize the join.

figures

Thanks,
Tony


WebFOCUS 8.1.05
Windows, All Outputs
 
Posts: 118 | Location: Birmingham, Al | Registered: July 23, 2015Reply With QuoteReport This Post
Member
posted Hide Post
quote:

I found a reference to something in IB Tech support (hottrack 60642543) that says if there isn't a file used in Table B then WebFOCUS won't recognize the join.


This may have been obvious to some but in case someone misses it like I did on first read...

If you don't use a FIELD from the joined table (TableB) then the join is ignored.


WebFOCUS 8.1.0.5
Windows 10, all output
 
Posts: 19 | Location: CT | Registered: April 12, 2013Reply With QuoteReport This Post
Guru
posted Hide Post
JOIN FILE file AT field TO ALL FILE file AT field AS name
WHERE condition

From Walter Flood's Hidden Gems


WF 7.6.11
Oracle
WebSphere
Windows NT-5.2 x86 32bit
 
Posts: 398 | Registered: February 04, 2008Reply With QuoteReport This Post
Member
posted Hide Post
Hello, I need assistance with a JOIN. I uploaded an EXCEL spreadsheet into WebFocus 8.1, and the administration created a mas. I want to join it to another table in Oracle, but I keep getting an error even with the correct key. Please assist.


WebFOCUS 8
Windows, All Outputs
 
Posts: 28 | Registered: January 10, 2017Reply With QuoteReport This Post
Member
posted Hide Post
Terri977,

Please provide the masters and join statement


WebFOCUS 8.1.0.5m
 
Posts: 26 | Registered: October 09, 2007Reply With QuoteReport This Post
Master
posted Hide Post
I wouldn't recommend directly joining an Excel file to your Oracle table. It will be really inefficient.


Eric Woerle
8.1.05M Gen 913- Reporting Server Unix
8.1.05 Client Unix
Oracle 11.2.0.2
 
Posts: 750 | Location: Warrenville, IL | Registered: January 08, 2013Reply With QuoteReport This Post
  Powered by Social Strata  
 

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] Join not working

Copyright © 1996-2018 Information Builders, leaders in enterprise business intelligence.