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] How to get the prt_path for oua_resources to join it to wf_resopobj

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] How to get the prt_path for oua_resources to join it to wf_resopobj
 Login/Join
 
Member
posted
I am trying to get the prt_path for a .fex file in oua_resources in order to join it to the wf_resopobj. Does anyone know of a way this can be done? Or does anyone have a good way to join oua_resources and wf_resopobj together? I haven't been able to find a good way to join these two tables together.

This message has been edited. Last edited by: FP Mod Chuck,
 
Posts: 10 | Registered: June 19, 2018Report This Post
Virtuoso
posted Hide Post
AlexB

I looked at the database diagram under the SQL Server Management console and there is no connection (join) possible between those two tables. What are you trying to accomplish?


Thank you for using Focal Point!

Chuck Wolff - Focal Point Moderator
WebFOCUS 7x and 8x, Windows, Linux All output Formats
 
Posts: 2127 | Location: Customer Support | Registered: April 12, 2005Report This Post
Master
posted Hide Post
You can use a recursive Common Table Expression on the UOA_RESOURCES table to build out the full path of the parent and then join on OBJNAME and PRT_PATH.

Below is a query that we use to see what files are published:
  
--Recursive CTE
WITH RESOURCES_CTE AS (
	SELECT ur.ID
		, ur.NAME                  'OBJNAME'
		, ur.OWNERID
		, ur.PARENTID
		, CAST('' AS VARCHAR(MAX)) 'PRT_PATH'
		, CAST('' AS VARCHAR(MAX)) 'FULL_PATH'
	FROM UOA_RESOURCES ur
	WHERE ur.PARENTID=-1
	UNION ALL
	SELECT ur.ID
		, ur.NAME
		, ur.OWNERID
		, ur.PARENTID
		, CAST(rc.FULL_PATH AS VARCHAR(MAX))
		, CAST(rc.FULL_PATH+'/'+ur.NAME AS VARCHAR(MAX))
	FROM UOA_RESOURCES ur
		INNER JOIN RESOURCES_CTE rc ON ur.PARENTID=rc.ID
	WHERE ur.PARENTID!=-1
)

--Main Query
SELECT wi.DATATYPE              'fileType'
    , wn.OBJDESC                'title'
    , wr.OBJNAME                'fileName'
    , wr.PRT_PATH               'parentPath'
    , CASE u.DESCRIPTION
        WHEN NULL THEN 'Y'
        ELSE 'N'
    END                          'published'
    , ISNULL(u.DESCRIPTION, '')  'owner'
FROM WF_REPOSOBJ wr
    LEFT JOIN WF_ITEM wi ON wr.HANDLE=wi.HANDLE
    LEFT JOIN WF_NLSOBJ wn ON wr.HANDLE=wn.OBJ_HANDLE
    LEFT JOIN RESOURCES_CTE rc ON rc.OBJNAME=wr.OBJNAME
                                AND rc.PRT_PATH=wr.PRT_PATH
    LEFT JOIN UOA_USERS u ON rc.OWNERID=u.ID
WHERE wr.PRT_PATH LIKE '/WFC/Repository/%'
    AND wr.CLASSNAME='WfItem'
ORDER BY wr.PRT_PATH
    , wi.DATATYPE
    , wr.OBJNAME;

This message has been edited. Last edited by: Hallway,


Hallway

 
Prod: 8202M1
Test: 8202M4
Repository:
 
OS:
 
Outputs:
 
 
 
 
 
Posts: 608 | Location: Salt Lake City, UT, USA | Registered: November 18, 2015Report This Post
Master
posted Hide Post
Since the UOA_RESOURCES table is a Hierarchical (Parent-child) table, the recursive CTE works beautifully. This site explains in detail how they work and how to build one: https://www.codeproject.com/Ar...ical-or-parent-child


Hallway

 
Prod: 8202M1
Test: 8202M4
Repository:
 
OS:
 
Outputs:
 
 
 
 
 
Posts: 608 | Location: Salt Lake City, UT, USA | Registered: November 18, 2015Report This Post
Virtuoso
posted Hide Post
Good One


Thank you for using Focal Point!

Chuck Wolff - Focal Point Moderator
WebFOCUS 7x and 8x, Windows, Linux All output Formats
 
Posts: 2127 | Location: Customer Support | Registered: April 12, 2005Report This Post
Member
posted Hide Post
Thank you for the help everyone! This was very helpful and worked great!
 
Posts: 10 | Registered: June 19, 2018Report This Post
Master
posted Hide Post
You're welcome. I'm glad that it helped.


Hallway

 
Prod: 8202M1
Test: 8202M4
Repository:
 
OS:
 
Outputs:
 
 
 
 
 
Posts: 608 | Location: Salt Lake City, UT, USA | Registered: November 18, 2015Report 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] How to get the prt_path for oua_resources to join it to wf_resopobj

Copyright © 1996-2020 Information Builders