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     [CLOSED]SQL to FOCUS

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED]SQL to FOCUS
 Login/Join
 
Gold member
posted
I am trying to help out a customer who is only able to provide me the SQL:


FROM [eSmartDataMart].[datamart].[vIncident] i

LEFT OUTER JOIN [eSmartDataMart].[datamart].[vIncidentRelationships] b ON i.BKIncidentNumber = b.BKIncidentNumber AND b.[RelatedItemType]='Problem Investigation'

LEFT OUTER JOIN [eSmartDataMart].[datamart].[vProblemInvestigation] p ON b.[BKRelatedItemID]=p.[BKProblemInvestigationID]
LEFT OUTER JOIN

My SQL is a little rusty- I see that I have three tables: vIncident, vIncidentRelationships and vProblemInvestigation. I am just a little foggy on how to issue the JOIN commands in FOCUS to generate this code- that is, how does a LEFT OUTER JOIN translate to FOCUS?

This message has been edited. Last edited by: <Emily McAllister>,


WebFOCUS 8
Windows, All Outputs
 
Posts: 71 | Registered: May 29, 2015Report This Post
Virtuoso
posted Hide Post
sh98110,

You can use a strait JOIN:
  
JOIN LEFT_OUTER 
BKIncidentNumber IN vIncident TO {UNIQUE | MULTIPLE} BKIncidentNumber IN vIncidentRelationships
AS B
END 
JOIN LEFT_OUTER 
BKRelatedItemID IN vIncident TO {UNIQUE | MULTIPLE} BKProblemInvestigationID IN BKProblemInvestigationID
AS P
END

And in your TABLE request add the condition on RelatedItemType.


Or you could use a WHERE-based JOIN:
  
JOIN LEFT_OUTER FILE vIncident AT BKIncidentNumber  TAG I
TO {UNIQUE | MULTIPLE}
-* Choose one of the above
FILE vIncidentRelationships AT BKIncidentNumber TAG B
WHERE I.BKIncidentNumber EQ B.BKIncidentNumber;
WHERE B.RelatedItemType EQ 'Problem Investigation';
END

For the second JOIN, you join the new structure to the third file:
  
JOIN LEFT_OUTER FILE vIncident AT B.BKRelatedItemID 
TO {UNIQUE | MULTIPLE}
-* Choose one of the above
FILE vProblemInvestigation AT BKProblemInvestigationID TAG  P
WHERE B.BKRelatedItemID EQ P.BKProblemInvestigationID ;
WHERE B.RelatedItemType EQ 'Problem Investigation';
END


Daniel
In Focus since 1982
wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF

 
Posts: 1980 | Location: Tel Aviv, Israel | Registered: March 23, 2006Report 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     [CLOSED]SQL to FOCUS

Copyright © 1996-2020 Information Builders