Reputation: 33
I have this in CL and would like to make it into a view. I first run 2 queries which are creating these 2 tables. How would the code here for the UNION ALL be? the 2 tables are (Logical) views
CPYF FROMFILE(JETDTA/EODDETAILH) +
TOFILE(JETDTA/EODDETAILS) MBROPT(*ADD) +
FMTOPT(*NOCHK)
MONMSG CPF0000
Upvotes: 0
Views: 121
Reputation: 981
Besides the structure of the queries result must match, you can do it with:
CREATE VIEW yourViewName AS
SELECT *
FROM JETDTA.EODDETAILH
UNION
SELECT *
FROM JETDTA.EODDETAILS
You can find more information about the CREATE VIEW command here and about the UNION clause here, both of those are part of SQL/400.
Upvotes: 1