Focal Point Banner
Community Center Education Summit Technical Support User Groups
Let's Get Social!

Facebook Twitter LinkedIn YouTube
Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED] [Thank you]Recursive (Self-Join) in .MAS file?
Go
New
Search
Notify
Tools
Reply
  
[CLOSED] [Thank you]Recursive (Self-Join) in .MAS file?
 Login/Join
 
Member
posted
Can this be done within the master file (.mas)? I only suggest a recursive join, but other techniques may return the desired results.

EXAMPLE:
The file hold 3 fields ID, IDNAME and MASTERID. The MASTERID is the 'parent' of the individual ID.
I'd like to develop a MASTERNAME which is the IDNAME when MASTERID eq ID.

ID IDNAME MASTERID MASTERNAME (VIRTUAL)
10 SMITH COMPANY 10 SMITH COMPANY
11 SMITH OF NY 10 SMITH COMPANY
12 SMITH OF NJ 10 SMITH COMPANY

20 JONES INTL 20 JONES INTL
21 FRANK'S 20 JONES INTL

Not a problem in a .fex

Things that make you go hmmmmm.

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


Production: WebFOCUS 7.703 & 8.104,
All output formats.
Win7-64,MS Office 2013.
Sandbox 8009
 
Posts: 27 | Registered: April 11, 2012Reply With QuoteReport This Post
Expert
posted Hide Post
How about showing the FEX CODE for our enlightenment as to exactly what it is that you want?
 
Posts: 3074 | Location: Middle Tennessee [8204M Gen48 in Test&Prod] | Registered: February 23, 2005Reply With QuoteReport This Post
Member
posted Hide Post
G'day Doug:

JOIN
CUSTOMER.MASTERID IN CUSTOMER TAG A TO MULTIPLE
CUSTOMER.ID IN CUSTOMER TAG B AS J0
END

TABLE FILE CUSTOMER
PRINT
A.ID AS 'ID'
A.IDNAME AS 'IDNAME'
B.MASTERID AS 'MASTERID'
B.IDNAME AS 'MASTERNAME(VIRTUAL)'
IF B.MASTERID EQ 10
END

Have tried building the .mas manually and with Synonym Editor. No Success.


Production: WebFOCUS 7.703 & 8.104,
All output formats.
Win7-64,MS Office 2013.
Sandbox 8009
 
Posts: 27 | Registered: April 11, 2012Reply With QuoteReport This Post
Virtuoso
posted Hide Post
create a clustered join, and rename segments and fields as needed.
 
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005Reply With QuoteReport This Post
Member
posted Hide Post
j.gross-

If I understand correctly, we would need at least two .MAS files? Customer and Customer1 that reference the same table. In Customer there would be join statment with a CRFILE=Customer1.

The preference would be to make that happen in 1 .Mas file.

My apology for not making that clear from the get-go.


Production: WebFOCUS 7.703 & 8.104,
All output formats.
Win7-64,MS Office 2013.
Sandbox 8009
 
Posts: 27 | Registered: April 11, 2012Reply With QuoteReport This Post
Virtuoso
posted Hide Post
j.gross suggestion is, in my opinion, the correct way to go. A WebFOCUS synonym does not seem to be able to have references to itself.

Trying to brute-force it renders a (FOC806) RECURSIVE REFERENCE error in 7.7.03M.



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, 2005Reply With QuoteReport This Post
Virtuoso
posted Hide Post
quote:
If I understand correctly, we would need at least two .MAS files


There will be two synonyms -- the original, and the Business View (which will have two segments, both of which reference the original).

In your report you will only reference the BV; but the original must be present and will be read behind the scenes at run time.
 
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005Reply With QuoteReport This Post
Master
posted Hide Post
Why not treat it a as GL Account and use FML.

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




Scott

 
Posts: 864 | Registered: May 24, 2004Reply With QuoteReport This Post
  Powered by Social Strata  
 

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED] [Thank you]Recursive (Self-Join) in .MAS file?

Copyright © 1996-2018 Information Builders, leaders in enterprise business intelligence.