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     [CLOSED] Recursive SQL in webfocus

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED] Recursive SQL in webfocus
 Login/Join
 
Member
posted
What si the proper syntax for Recursive SQL in webfocus.
I have the query
Recursive SQL in webfocus
SQL
SELECT A.*
FROM
TBL_BOM_EXPLODE A
START WITH
PARTNUMBER IS NULL
CONNECT BY
PRIOR ENDITEM=PARTNUMBER;
TABLE FILE SQLOUT
PRINT *
WHERE READLIMIT EQ 10
END
Error message-FOC14069) SYNTAX ERROR ON LINE 4 AT 'START' -- Semi-colon or END expected

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


WebFOCUS 7.69
Windows
Excel, HTML, PDF,AHTML
 
Posts: 14 | Registered: November 16, 2009Report This Post
Expert
posted Hide Post
I'm pretty sure this is not supported.

Please take a look at Creating Reports With WebFOCUS Language > Using SQL to Create Reports > Supported and Unsupported SQL Statements.


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
i have used this,this works
SQL
SELECT A.PLANT, A.ENDITEM AS PARENT_PART_NUM
, C.PARTNUMBER, C.TYPE AS TYP
FROM TBL_BOM_EXPLODE A
-*LEFT JOIN TBL_BOM_EXPLODE B
-*ON A.PARTNUMBER = B.ENDITEM
INNER JOIN TBL_PART_BOM C
ON A.ENDITEM = C.PARTNUMBER
WHERE C.TYPE = 'PP'
AND C.PARTNUMBER IN (SELECT DISTINCT T.ENDITEM FROM TBL_BOM_EXPLODE T, TBL_BOM_EXPLODE Q WHERE T.PARTNUMBER <> Q.ENDITEM )
-*ORDER BY A.ENDITEM
ORDER BY PARENT_PART_NUM
;
TABLE FILE SQLOUT
PRINT *
-*ON TABLE SAVE AS PARTNUM
END


WebFOCUS 7.69
Windows
Excel, HTML, PDF,AHTML
 
Posts: 14 | Registered: November 16, 2009Report This Post
Virtuoso
posted Hide Post
CONNECT BY/START WITH is an Oracle-specific feature that implements recursive (circular) joins and, as far as I know, is not part of ANSI SQL, so unless your iWay adapter is set to Oracle (SQLORA), that feature would not be supported by WebFOCUS as standard SQL.

Using SQL pass-thru against an Oracle database does work.

SQL SQLORA
with emp as (
select 1 employee, null manager, 'CEO' position from dual union all
select 2 employee, 1 manager, 'Director 1' position from dual union all
select 3 employee, 1 manager, 'Director 2' position from dual union all
select 4 employee, 2 manager, 'Manager 1' position from dual union all
select 5 employee, 4 manager, 'Developer 1' position from dual union all
select 6 employee, 4 manager, 'Developer 2' position from dual union all
select 7 employee, 4 manager, 'Developer 3' position from dual union all
select 8 employee, 3 manager, 'Manager 2' position from dual union all
select 9 employee, 8 manager, 'Developer 4' position from dual union all
select 10 employee, 8 manager, 'Developer 5' position from dual
) 
select rpad('_',2*(level-1),'_') || emp.position as "position_tree"
  from emp
connect by prior employee = manager
start with manager is null
;
TABLE FILE SQLOUT
PRINT *
END



Prod/Dev: WF Server 8008/Win 2008 - WF Client 8008/Win 2008 - Dev. Studio: 8008/Windows 7 - DBMS: Oracle 11g Rel 2
Test: Dev. Studio 8008 /Windows 7 (Local) Output:HTML, EXL2K.
 
Posts: 1533 | Registered: August 12, 2005Report 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     [CLOSED] Recursive SQL in webfocus

Copyright © 1996-2020 Information Builders