I am using WebSmart with the I-series data base files. I am joining two data base files receiving the RRN so that I can use the fetch rrn and the fextnext to display one screen at a time in my WebSmart program. I have used this method many times except this time I have a one to many relationship and I only want the Max(date) for the second file. I am getting an SQLCOD of -501. Can someone help?
The SQL statement is:
SELECT RRN(XTF419), XTF419.EICNTR, XTF419.EIEMP, XTF419.EILNAM, XTF419.EIFNAM,
XTF419.EISTA, XTF419.EIDEPT, XTL420L1.ECCNTR, XTL420L1.ECEMP,
XTL420L1.ECCNBR, MAX(XTL420L1.ECCDTE) FROM XTF419, XTL420L1 WHERE
XTF419.EICNTR = XTL420L1.ECCNTR AND XTF419.EIEMP = XTL420L1.ECEMP
AND XTL420L1.ECCNBR = '145MGMT' AND XTL420L1.ECRSTS <> 01 AND
XTL420L1.ECRSTS <> 20 GROUP BY XTF419.EICNTR, XTF419.EIEMP,
XTF419.EIDEPT,XTL420L1.ECCNTR, XTL420L1.ECEMP,XTL420L1.ECCNBR ORDER
BY XTF419.EICNTR, XTF419.EIEMP FOR FETCH ONLY
Free Guide: Managing storage for virtual environments
Complete a brief survey to get a complimentary 70-page whitepaper featuring the best methods and solutions for your virtual environment, as well as hypervisor-specific management advice from TechTarget experts. Don’t miss out on this exclusive content!