Page 1 of 1

Reference a flat file in a DB2 Query

PostPosted: Fri Feb 03, 2017 9:18 pm
by DonkeyKong
Right now I'm just messing around in SPUFI. Eventually I am going to either execute this from a job or from a COBOL program.

I'm dealing with a very complex query that is touching on multiple tables and the same table in multiple ways to get the data that I want.

So I have, say 6 SELECT statements. I would like to split these up so that I can reference them in the outer most SELECT as Flat files. Can I do that?

SELECT *
FROM (INCLUDE??) Flat.File.A
LEFT JOIN (INCLUDE??) Flat.File.B
WHERE.....

Thanks in advance for any help!

DK