Focal Point Banner


As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.

Join the TIBCO Community
TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.

  • From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
  • Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
  • Request access to the private WebFOCUS User Group (login required) to network with fellow members.

Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] Command to Display Left Outer Join

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Command to Display Left Outer Join
 Login/Join
 
Expert
posted
I have the following join and need to see that it is, in fact, being used / translated to SQL, as a left_outer join.

What is the command to do that ('CHECK FILE [FN] PICTURE' AND '? JOIN [FN]' don't show it)?

JOIN THIS_ID IN FILE1 TO UNIQUE THAT_ID IN FILE2 TAG J001 AS J001

BTW: These are DB2 tables for the "? FDT" is useless.

Thanks, Doug

This message has been edited. Last edited by: FP Mod Chuck,




   In FOCUS Since 1983 ~ from FOCUS to WebFOCUS.
   Current: WebFOCUS Administrator at FIS Worldpay | 8204, 8206
 
Posts: 3132 | Location: Tennessee, Nashville area | Registered: February 23, 2005Report This Post
Virtuoso
posted Hide Post
SET TRACEOFF = ALL
SET TRACEON = STMTRACE//CLIENT
SET TRACEON = SQLAGGR//CLIENT
SET TRACEUSER = CLIENT


WebFOCUS 8.1.03, Windows 7-64/2008-64, IBM DB2/400, Oracle 11g & RDB, MS SQL-Server 2005, SAP, PostgreSQL 11, Output: HTML, PDF, Excel 2010
: Member of User Group Benelux :
 
Posts: 1669 | Location: Enschede, Netherlands | Registered: August 12, 2010Report This Post
Virtuoso
posted Hide Post
Have you tried to add SQL trace ?
SET SQLTOPTTF = ON
SET TRACEOFF  = ALL
SET TRACESTAMP= OFF
SET TRACEWRAP = 72
SET TRACEON   = SQLTRANS
SET TRACEON   = SQLAGGR//CLIENT
SET TRACEON   = STMTRACE//CLIENT
SET TRACEON   = STMTRACE/1/CLIENT
SET TRACEON   = STMTRACE/2/CLIENT
SET TRACEUSER = ON
SET MSG       = ON
SET HOLDSTAT  = ON
SET EMGSRV    = ON
-SET &ECHO    = ALL;


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: 2409 | Location: Montreal Area, Qc, CA | Registered: September 25, 2013Report This Post
Expert
posted Hide Post
That's the problem, the SQL Trace shows it as an inner JOIN.
 
Posts: 3132 | Location: Tennessee, Nashville area | Registered: February 23, 2005Report This Post
Virtuoso
posted Hide Post
Try this syntax:

JOIN LEFT_OUTER XXX IN SUMMARY_FILE
TO UNIQUE YYY IN DETAIL_FILE TAG J001 AS J001
END


WebFOCUS 8206, Unix, Windows
 
Posts: 1853 | Location: New York City | Registered: December 30, 2015Report This Post
Expert
posted Hide Post
Here's my results:
SET TRACEOFF=ALL
SET TRACEUSER=CLIENT
SET TRACEON=SQLAGGR//CLIENT
SET TRACEON=STMTRACE//CLIENT
SET TRACEON = STMTRACE/2/CLIENT
SET TRACEON = SQLTRANS
SET TRACESTAMP = OFF
-RUN
JOIN LEFT_OUTER THIS_ID IN FILE1 TO UNIQUE THAT_ID IN FILE2 TAG J001 AS J001
-RUN
TABLE FILE DF_FILE1
BY THIS_ID
ON TABLE HOLD
END
-EXIT
NUMBER OF RECORDS IN TABLE=        1  LINES=      1
There are        1 lines;
AGGREGATION DONE ...
SELECT
T1."THIS_ID",
MAX(T1."PRESCRIBER_ID")
FROM
FILE1 T1
WHERE
(T1."THIS_ID" >= 0)
GROUP BY
T1."THIS_ID"
ORDER BY
T1."THIS_ID"
FOR FETCH ONLY;

This message has been edited. Last edited by: Doug,
 
Posts: 3132 | Location: Tennessee, Nashville area | Registered: February 23, 2005Report This Post
Virtuoso
posted Hide Post
You have to reference a field in each table for the join to be in effect. Your report has only one field in it.


WebFOCUS 8206, Unix, Windows
 
Posts: 1853 | Location: New York City | Registered: December 30, 2015Report This Post
Expert
posted Hide Post
Note to self: DUH, I knew that.
SELECT
T1."THISID",
T2."SOME_DATE",
MAX(T1."THISID")
FROM
( FILE1 T1
LEFT OUTER JOIN FILE2 T2
ON T2."THAT_ID" = T1."THISID" )
WHERE
(T1."THISID" >= 0)
GROUP BY
T1."THISID",
T2."SOMDATE"
ORDER BY
T1."THISID",
T2."SOMDATE"
FOR FETCH ONLY;
So, it is showing it in this example. I'll go back to the real / production joins and verify it from the user.
 
Posts: 3132 | Location: Tennessee, Nashville area | Registered: February 23, 2005Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] Command to Display Left Outer Join

Copyright © 1996-2020 Information Builders