Can two files be joined in QMQRY? Seems like it should be ok.
I tried to join multiple files in a QMQRY and it was not happy.
Does not like the A behind my first file.
So, I am not happy. Friday, yet?
Here is the source:
INSERT INTO DANRLIB/STEP001(SELECT A.TRFBCH, A.TRFSTS, A.TRFTYP,
A.TRFFLC, A.TRFTLC, A.TRFIDT, A.TRFINS, A.TRFREF, B.INUMBR,
B.TRFREQ, B.TRFSHP, B.TRFREC, B.TRFALC
FROM MM4R6LIB/TRFHDR A, MM4R6LIB/TRFDTL B
WHERE A.TRFBCH = B.TRFBCH AND B.TRFSTS = "A"
AND A.TRFFLC IN(902, 904, 970, 971)
AND A.TRFIDT >= 060601
AND A.TRFIDT <= &NXTSAT
AND A.TRFTLC <> 66
AND A.TRFTLC <> 68
ORDER BY A.TRFLLC)
the message I got:
Type a value for variable "NXTSAT" and press Enter.
Column or global variable A not found.
RUN QUERY command failed with SQLCODE -206.
RUN QUERY command ended due to error.
STRQMQRY command failed.