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     multi column outer join with focus datasource

Read-Only Read-Only Topic
Go
Search
Notify
Tools
multi column outer join with focus datasource
 Login/Join
 
Platinum Member
posted
I'm trying to do an outer join on a SQL table (TabSQL) to a Focus data source (TabFOC). The relevant columns are 'id' and 'wzid'. Each table has an ID present. TabSQL has WZID for each record, but TabFOC does not. What's the way to do this?

I've tried:
1. conditional join on the ID columns, comparing the WZID columns in the where statement, but performance on this was terrible (several minutes, maybe 10, for about 30,000 recs)
2. concatenated key field (ID_WZID) but I don't the outer join would work
3. indexing the two columns in the master file, sorting both tables by those fields, but I keep getting 'value out of order in TO field' (in TabFOC)

Any other methods I'm not trying?


Thanks.

Mark
WF 7.6 Windows
 
Posts: 150 | Registered: July 26, 2007Report This Post
Expert
posted Hide Post
Mark,

First of all, joining TabSQL to TabFOC is a heterogeneous join and not recommended because WebFOCUS has to do the join anyway. The best thing to do is to extract the data that you need from both tables separately.

Put the output from the host of the join in a HOLD FORMAT ALPHA file. Put the target of the join in a HOLD FORMAT FOCUS INDEX ID file. Then join to all with SET ALL=ON.

I am confused about not all records in the TabFOC not having a WZID. Could you explain that further. Is the field blank?

Another thing I could recommend is that when you are creating the hold files above, you can create a concatenated field containing both ID and WZID and then using that to join to.


Ginny
---------------------------------
Prod: WF 7.7.01 Dev: WF 7.6.9-11
Admin, MRE,self-service; adapters: Teradata, DB2, Oracle, SQL Server, Essbase, ESRI, FlexEnable, Google
 
Posts: 2723 | Location: Ann Arbor, MI | Registered: April 05, 2006Report This Post
Platinum Member
posted Hide Post
Thanks Ginny.
re:WZID...yes, some of the records will have a blank WZID, which is why the outer join won't work...

Example, using KEY as concatenated field:
TabSQL has ID=2, WZID=10, so KEY='2_10'
TabFOC has ID=2, WZID=blank, so KEY='2_'

I need records to match where '2_10' = '2_'

Hence, the outer join.


Thanks.

Mark
WF 7.6 Windows
 
Posts: 150 | Registered: July 26, 2007Report This Post
Expert
posted Hide Post
Just join on ID then. And do the two separate pulls as I described above. Also do a JOIN to ALL. Then you can test the contents of WZID to see if they match.


Ginny
---------------------------------
Prod: WF 7.7.01 Dev: WF 7.6.9-11
Admin, MRE,self-service; adapters: Teradata, DB2, Oracle, SQL Server, Essbase, ESRI, FlexEnable, Google
 
Posts: 2723 | Location: Ann Arbor, MI | Registered: April 05, 2006Report This Post
Platinum Member
posted Hide Post
Thanks, I'll give that a shot.


Thanks.

Mark
WF 7.6 Windows
 
Posts: 150 | Registered: July 26, 2007Report This Post
Expert
posted Hide Post
You don't need to extract the host file to a FORMAT ALPHA file, but you should extract the FOCUS file to FORMAT ALPHA.

Then as long as

  • The Target is sorted low to high for all join fields.
  • The SQL generated for the retrieval for the host generates an ORDER BY containing the join fields (low to high).

It will work.

You can then also use SET ALL=ON|PASS to keep all the host records.


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!

 
Posts: 6347 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 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     multi column outer join with focus datasource

Copyright © 1996-2020 Information Builders