Focal Point
[CLOSED] JOIN with WHERE not working after migration 7706

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

June 16, 2015, 01:49 PM
as2010
[CLOSED] JOIN with WHERE not working after migration 7706
Hi,

I have recently migrate from 7704M to 7706M. The code below worked in old version but in new is throwing an error:

JOIN
TIG00513.N_PE IN TIG00513 TO TIG00479.N_PE IN TIG00479 AS Z6
WHERE (C_GRAN_CLI EQ '075') AND (Z_INICIO LE '20150615' AND Z_FIM GT '20150615') AND (Z_DIA EQ '20150615');
END

TABLE FILE TIG00513
...

0 ERROR AT OR NEAR LINE 69 IN PROCEDURE __WCFEX FOCEXEC *
(FOC376) SYNTAX ERROR OR MISSING ELEMENT IN JOIN/COMBINE COMMAND

Any ideias?

Tnaks in advance.

AS

This message has been edited. Last edited by: <Kathryn Henning>,


7706M
AIX 7.1
HTML
June 16, 2015, 04:07 PM
Francis Mariani
A Conditional JOIN requires an AT attribute. Perhaps code tightening is causing the error. Try adding AT cross-referenced-column-name.

The syntax of the conditional (WHERE-based) JOIN command is 

JOIN [LEFT_OUTER|INNER] FILE hostfile AT hfld1     [WITH hfld2] [TAG tag1]
     TO {UNIQUE|MULTIPLE} 
     FILE crfile AT crfld [TAG tag2] [AS joinname]
     [WHERE expression1;
     [WHERE expression2;
     ...]
END


Documentation: Creating Reports With WebFOCUS Language > Joining Data Sources > Using a Conditional Join


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
June 17, 2015, 05:48 AM
as2010
Hi,

I've rewrite the join to:

JOIN FILE TIG00513 AT N_PE
TO UNIQUE
FILE TIG00479 AT N_PE AS Z6
WHERE (C_GRAN_CLI EQ '075');
WHERE (Z_INICIO LE '20150615' AND Z_FIM GT '20150615') AND (Z_DIA EQ '20150615');
END

This doesn't give any error but hangs forever.
Am I missing something?

Thanks one more time.


7706M
AIX 7.1
HTML
June 17, 2015, 09:28 AM
j.gross
If the data sources are relational databases, you should obtain and inspect the SQL statement trace.


- Jack Gross
WF through 8.1.05