Your first TABLE command in the example you post creates a flat file which is not really recognized by SQL. If you need to select data, why not do it with the first TABLE command. SQL will work great against an RDB file and you can execute it from within FOCUS.
How about
TABLE FILE CAR
PRINT THE_FIELDS_I_WANT
WHERE ARGUMENT EQ FIELDX
ON TABLE HOLD AS HOLD1 FORMAT fmt
END
See Chapter 9 in WF5.2 Creating Reports for fmt
And fmt can be DB2
If you can provide more details as to what your requirements are, you can get a better answer.
SET SQLENGINE=SQLMSS -* In this case SQLServer
SQL SQLMSS
SELECT Field1, Field2 FROM PathToTable;
TABLE FILE SQLOUT
PRINT *
END
Make sure you put the semicolon after the select statement and that you
fully qualify your table names. You can look in
the acx files for the path to the table. Once the data is brought back
to the hold file called sqlout, you can then use focus to format the report
any way that you want.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.