Focal Point
[SOLVED] Using decode statement in metadata and joins

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/7677053206

April 18, 2011, 12:43 PM
cgiuda
[SOLVED] Using decode statement in metadata and joins
Hi,

Has anyone used decode statements in their metadata and then tried doing a join on that table and a report after that?

Ever since we added a decode statement to one of our tables (call it TABLEA) when we try to do a report after joining it with another table (TABLEB to MULTIPLE TABLEA) we get this strange message, when then trying to create a report on it:

----------------------------

"Error parsing MASTER file TABLEB((FOC061)) "WITH FIELDNAME' IN DEFINE LIES ON DIFFERENT PATH: S
(FOC101) ERROR IN DEFINE IN MASTER FILE: TABLEB
(FOC282) RESULT OF EXPRESSION IS NOT RECOGONIZED: FILE_NAME
(FOC009) INCOMPLETE REQUEST STATEMENT
(61)).

-------------------

A report can be done on either table, TABLEA or TABLEB if they are not joined to another table first.

Also, if the join is done in the opposite direction
TABLE TO TABLEB, that report works.

Thanks,
Colleen

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


WebFocus 8104, IBMi (server), Windows 7 (client), iWay 6.1
April 18, 2011, 12:48 PM
Francis Mariani
Please post both Masters.


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
April 18, 2011, 03:30 PM
cgiuda
Your question to post the master files promtped me to look more closely at them.

I found that the statement in the master file with the decode statement was using a "WITH FIELDA" statement where FIELDA is the name of a field in both TABLEA and TABLEB.

I edited the WITH FIELDA statement and changed it to WITH FIELDC (a field only in that table), and that fixed the problem!

Thanks!


WebFocus 8104, IBMi (server), Windows 7 (client), iWay 6.1
April 18, 2011, 04:11 PM
Francis Mariani
There you go!


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
April 18, 2011, 06:10 PM
Waz
Its great to see someone solve there own problem.
Good One


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!