I'm trying to make a simple JOIN between two tables with the same structure:
TABLE FILE IMPORT_BLOOMBERG
PRINT
RTG_BB_COMP AS 'R29'
DATEIMPORT AS 'D29'
WHERE DATEIMPORT EQ '20090129'
BY ISIN AS 'I29'
ON TABLE HOLD AS TAB29
END
TABLE FILE IMPORT_BLOOMBERG
PRINT
RTG_BB_COMP AS 'R28'
DATEIMPORT AS 'D28'
WHERE DATEIMPORT EQ '20090128';
BY ISIN AS 'I28'
ON TABLE HOLD AS TAB28
END
JOIN CLEAR*
JOIN I29 IN TAB29 TO I28 IN TAB28 AS J1
-RUN
And I become this error message: (FOC376) SYNTAX ERROR OR MISSING ELEMENT IN JOIN/COMBINE COMMAND
Any idea to solve this problem?This message has been edited. Last edited by: Kerry,
WebFOCUS 7.6.4 running on Windows Output formats : PDF, Excel and HTML My blog
February 02, 2009, 06:33 AM
nubi
why are you starting the join with the '-' symbol?This message has been edited. Last edited by: nubi,
Developer Studio 7.64 Win XP Output: mostly HTML, also Excel and PDF
"Never attribute to malice that which can be adequately explained by stupidity." - Heinlein's Razor
February 02, 2009, 06:51 AM
Jérény Deidda
It was a test. It doesn't work with and without the "-" before JOIN.
I will correct my first post to withdraw this "-".
WebFOCUS 7.6.4 running on Windows Output formats : PDF, Excel and HTML My blog
February 02, 2009, 09:09 AM
Jérény Deidda
I solved the problem and it was very very very ... stupid:
I wrote JOIN CLEAR* instead of JOIN CLEAR *!!!!
Thanks for your help, this topic can be close and taggued as "Solved".
WebFOCUS 7.6.4 running on Windows Output formats : PDF, Excel and HTML My blog
February 02, 2009, 11:25 AM
Darin Lee
If you learned something from it, it wasn't stupid - just an annoyance. Good job. Also, you have to tag the topic as SOLVED yourself. Go to your original post and you can edit the subject line.
Regards,
Darin
In FOCUS since 1991 WF Server: 7.7.04 on Linux and Z/OS, ReportCaster, Self-Service, MRE, Java, Flex Data: DB2/UDB, Adabas, SQL Server Output: HTML,PDF,EXL2K/07, PS, AHTML, Flex WF Client: 77 on Linux w/Tomcat
February 02, 2009, 01:16 PM
FrankDutch
Jereny
Although it works now I would like to give some advice on this.
You create two holdfiles and you are trying to join them on the ISIN code. If you want to join two hold tables they should be focus files. On of the files also should have a index key. So say "on table hold them as xxx format focus index ISIN"
I don't why you are trying to do this, but keep in mind that on of the Holdfiles might have an ISIN that is not in the other.
Frank
prod: WF 7.6.10 platform Windows, databases: msSQL2000, msSQL2005, RMS, Oracle, Sybase,IE7 test: WF 7.6.10 on the same platform and databases,IE7
February 03, 2009, 06:34 AM
Danny-SRL
Jérény,
Apparently, in your example you are assuming that ISIN values are unique, meaning that you wont have more than one record per ISIN value. In this case, since you have sorted by ISIN, you shouldn't have any JOIN problems.
However, should that not be the case, and should you wish to have a JOIN MULTIPLE, then yes, you would need to create a FOCUS file, at least for the target file and use ON TABLE HOLD AS TAB28 FORMAT FOCUS INDEX I28.
Now if your extracted files are large (more than 20K records) you might experience some throughput degradation. In which case, it would be advisable to use some advanced techniques by loading your data yourself into a FOCUS file and creating the index after with REBUILD... INDEX.
Daniel In Focus since 1982 wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF