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] Join on Hold File

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Join on Hold File
 Login/Join
 
Member
posted
Hi, I have a table called incidentsm1 which has two fields that store ID's, opened.by and contact.name. I need to provide the full names related to the ID's. The problem I'm having is how to do two joins to the contctsm1 table where full name is stored. I'll try to explain with an example.

will have record in incidentsm1 where opened.by is ID01 and contact.name is ID02. I need to return the full name related to ID01 and ID02.

I two joins to the same table but report returned same fullname for both opened.by and contact.name when I know they are not the same, I also I tried a hold file. Any suggestions would be appreciated.

Two Joins to same table that didn't work

SET XRETRIEVAL=ON

JOIN
INCIDENTSM1.INCIDENTSM1.CONTACT_NAME IN INCIDENTSM1 TO MULTIPLE
CONTCTSM1.CONTCTSM1.CONTACT_NAME IN CONTCTSM1 TAG J1 AS J1
END
JOIN
INCIDENTSM1.INCIDENTSM1.OPENED_BY IN INCIDENTSM1 TO MULTIPLE
CONTCTSM1.CONTCTSM1.CONTACT_NAME IN CONTCTSM1 TAG J0 AS J0
END


Hold File Join that also didn't work

TABLE FILE CONTCTSM1
LIST CONTACT_NAME AND FULL_NAME
ON TABLE HOLD AS HOLDSM
END

JOIN
INCIDENTSM1.INCIDENTSM1.CONTACT_NAME IN INCIDENTSM1 TO UNIQUE
CONTCTSM1.CONTCTSM1.CONTACT_NAME IN CONTCTSM1 TAG J1 AS J1
END
JOIN
INCIDENTSM1.INCIDENTSM1.OPENED_BY IN INCIDENTSM1 TO UNIQUE
HOLDSM.HOLDSM.CONTACT_NAME IN HOLDSM TAG J2 AS J2
END

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


WebFOCUS 7.6
Windows, All Outputs
 
Posts: 13 | Registered: August 22, 2013Report This Post
Expert
posted Hide Post
JOIN
INCIDENTSM1.INCIDENTSM1.CONTACT_NAME IN INCIDENTSM1 TO MULTIPLE
CONTCTSM1.CONTCTSM1.CONTACT_NAME IN CONTCTSM1 TAG J1 AS J1
END
JOIN
INCIDENTSM1.INCIDENTSM1.OPENED_BY IN INCIDENTSM1 TO MULTIPLE
CONTCTSM1.CONTCTSM1.CONTACT_NAME IN CONTCTSM1 TAG J0 AS J0
END

Use the TAG prefix (the AS is to help reference the columns in subsequent TABLE requests - you need to have ASNAMES ON if you're creating a HOLD file with the AS option):
TABLE FILE INCIDENTSM1
PRINT
J1.FULL_NAME AS 'CONTACT_FULL_NAME'
J0.FULL_NAME AS 'OPENED_BY_FULL_NAME'
...


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Member
posted Hide Post
Thanks Francis, I'm not familiar with Tag names so I'm not sure what value I should be putting in Host Tag, Cross Tag and Join Name. I was getting the following error when running the join.

Error:
(FOC1831) TAGNAME OR FILENAME IS DUPLICATED IN THIS JOIN/COMBINE: @0000009


Join

SET ASNAMES=ON

TABLE FILE CONTCTSM1
LIST CONTACT_NAME AND FULL_NAME
ON TABLE HOLD AS HOLDSM
END
SET XRETRIEVAL=ON

JOIN
INCIDENTSM1.INCIDENTSM1.CONTACT_NAME IN INCIDENTSM1 TAG J1 TO MULTIPLE
CONTCTSM1.CONTCTSM1.CONTACT_NAME IN CONTCTSM1 TAG J2 AS J3
END
JOIN
INCIDENTSM1.INCIDENTSM1.OPENED_BY IN INCIDENTSM1 TAG J4 TO MULTIPLE
HOLDSM.HOLDSM.CONTACT_NAME IN HOLDSM TAG J5 AS J6
END


WebFOCUS 7.6
Windows, All Outputs
 
Posts: 13 | Registered: August 22, 2013Report This Post
Member
posted Hide Post
Francis,

I got the two joins to the same table to work. Thanks for pointing me i the right direction. I needed to use the fully qualified name.


TABLE FILE INCIDENTSM1
PRINT
INCIDENT_ID
J1.CONTCTSM1.FULL_NAME
J2.CONTCTSM1.FULL_NAME


WebFOCUS 7.6
Windows, All Outputs
 
Posts: 13 | Registered: August 22, 2013Report 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] Join on Hold File

Copyright © 1996-2020 Information Builders