[SOLVED] Creating a column for a business view on a cluster join
Hi Everyone,
I have a cluster join which is created joining 5 synonyms S1, S2, S3, S4, S5 etc. I need to create a column for a business view using this cluster join where the condition for the column in SQL is "Select S1.column1 where S2.column3='ZZ'". How do I do this in WebFocus in a define field? Is there any better approach to accomplish this?This message has been edited. Last edited by: FP Mod Chuck,
WebFOCUS 8 Windows, All Outputs
March 21, 2018, 01:24 PM
BabakNYC
Insert a DEFEINEd expression into the synonym that says something like this:
IF S2.COLUMN3 NE 'ZZ' THEN MISSING ELSE S1.COLUMN1
make sure you have MISSING ON. This is an example for car sample file:
UKSALES/D12.2 MISSING ON=IF COUNTRY EQ 'ENGLAND' THEN SALES ELSE MISSING;
WebFOCUS 8206, Unix, Windows
March 22, 2018, 01:13 PM
Leela Krishna
BabakNYC,
Thank you very much. It worked.
Regards KrishnaThis message has been edited. Last edited by: Leela Krishna,
WebFOCUS 8 Windows, All Outputs
March 23, 2018, 05:30 PM
Leela Krishna
In the column S2.Column3 there are only 3 distinct values, Is there a way I can create a new define/compute field based on the condition "Select S1.column1 where S2.column3='ZZ'" where when a user selects the column in the business view it will prompt and ask the user to pick 1 out of 3 values?
values available in the column S2.Column3 are 'ZX','ZY' and'ZZ'.
Note: This column need to be created on a business view.
quote:
Originally posted by Leela Krishna: Hi Everyone,
I have a cluster join which is created joining 5 synonyms S1, S2, S3, S4, S5 etc. I need to create a column for a business view using this cluster join where the condition for the column in SQL is "Select S1.column1 where S2.column3='ZZ'". How do I do this in WebFocus in a define field? Is there any better approach to accomplish this?
This message has been edited. Last edited by: Leela Krishna,
WebFOCUS 8 Windows, All Outputs
March 25, 2018, 04:05 PM
BabakNYC
Look up ACCEPT VALUES in the doc on creating synonyms. I think that might be one possible solution.