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.
What would be the easiest way to (without creating a new database table) create a single table with a unique list of account numbers from multiple tables that I can use to then left outer join my multiple tables on to.
In other words I have 3 tables for example that all have the following Account1 as a field and a value field.
Now in Table 1, Account1 has a b and c and in Table 2 the field has a b and d and in Table 3 a and c only.
Now I want to join them so that I have Account1 showing a b c and d (without duplicates) and then use this to left outer join tables1 2 and 3's values to this unique list.
(Bearing in mind that my unique list is not just account1 it is actuall account 1,2,3,4,and 5! So may have to create template table for this!)
Any help is appreciated.
I have tried doing a select distinctThis message has been edited. Last edited by: Michael_86,
It does depend if your source is a SQL or focus format file and if the second step where you want to join this first result with is also focus or SQL. You can create a union select in SQL or you can do more or less the same in focus. You say not to be willing to create a new table, but in fact you do that even if it is a temporary one. If you select the data from the first table you can do this ...
TABLE FILE ONE
BY ACCOUNT1
BY FAAAA
ON TABLE HOLD AS HOLDA
END
TABKE FILE TWO
BY ACCOUNT1
BY FAAAA
ON TABLE HOLD AS HOLDB
END
...and so on...
Then...
TABLE FILE HOLDA
BY ACCOUNT1
BY FAAAA
ON TABLE HOLD AS FINALHOLD FORMAT FOCUS INDEX ACCOUNT1
MORE
FILE HOLDB
...
END
This should give you the unique selection of account1 with the fields
If you want to join this intermediate result with an other table you need to add an index to the hold file That is what I did in the last hold statement
I hope this is what you want
Frank
prod: WF 7.6.10 platform Windows, databases: msSQL2000, msSQL2005, RMS, Oracle, Sybase,IE7 test: WF 7.6.10 on the same platform and databases,IE7
Posts: 2387 | Location: Amsterdam, the Netherlands | Registered: December 03, 2006
Thanks for the reply, that worked perfectly for what I needed, but I didnt need to link back unique list as in the end I created a new table that I uploaded as a master file to link to directly. But I have used this already in a different report. So thank you for your help.