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.
I need to join two tables (log_dump & site_to_ip). The fields I need to join are P_IP from log_dump and IP from site_to_ip. I don't have the last set of digits in site_to_ip. For example, in log_dump P_IP is 10.160.98.31 and in site_to_ip IP is 10.160.98.
Is there a way to do a join using "like"?
Thanks in advance for your input!
DeniseThis message has been edited. Last edited by: DMA,
WebFOCUS v. 7.6.8 || Windows XP || Format Output: HTML, PDF, EXCEL
Posts: 57 | Location: NYC | Registered: November 13, 2008
I would do a "define-based" join, by defining a field in the host file that contains the first three sets of digits.
Described in the doc: Creating Reports With WebFOCUS Language > Joining Data Sources > Creating an Equijoin > Joining From a Virtual Field to a Real Field Using an Equijoin
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
Thank you that did work, however, I forgot to mention that the IP with the missing digits represents a location and I need to display the IP with the correct location and it's not coming up that way.
Table log_dump has the full IP, table site_to_ip has the partial IP and the location name. When I run my report I need to see the location that corresponds to the correct, full IP.
Any suggestions?
Thanks!
WebFOCUS v. 7.6.8 || Windows XP || Format Output: HTML, PDF, EXCEL
Posts: 57 | Location: NYC | Registered: November 13, 2008
The following should display an P_IP from log_dump, the corresponding (truncated) IP from site_to_ip and a LOCATION (update this field name as appropriate) from site_to_ip. I have assumed P_IP is an A50, you should update the DEFINE of IP with a different length as appropriate. You can, of course, add whatever other fields are in either table:
JOIN IP WITH P_IP IN LOG_DUMP TO ALL IP IN SITE_TO_IP AS J0 DEFINE FILE LOG_DUMP IP/A50=SUBSTR(50,P_IP,1,50-POSIT(REVERSE(50,P_IP,'A50'),50,'.',1,'I2'),50,'A50'); END TABLE FILE LOG_DUMP PRINT P_IP IP LOCATION END