when I run the following as a sql statment I get my result, but whenI try and create a view of it I get errors.
SELECT TestID, AssyRev, SalesRev, (select passfail from tblpassfail where tblPFtestdata.PFcurrentl = tblpassfail.PFID)
AS PFCurrentL, (select passfail from tblpassfail where tblPFtestdata.PFcurrentNL = tblpassfail.PFID)
AS PFCurrentNL
FROM LIBTEST.tblPFtestData
CREATE VIEW qryPFtest AS SELECT TestID, AssyRev, SalesRev,
([color=red]select[/color] passfail from tblpassfail where tblPFtestdata.PFcurrentl = tblpassfail.PFID) AS PFCurrentL,
(select passfail from tblpassfail where tblPFtestdata.PFcurrentNL = tblpassfail.PFID)
AS PFCurrentNL
FROM LIBTEST.tblPFtestData
where the red select is where I get the error. says it is not a valid token. This is being created on IBM DB2, server is AS400. soesn't seem like much experience on here for that but ws hoping this could be a problem on any database since it is standard SQL statement. any clues out there?