techmanbd Posted December 17, 2003 Posted December 17, 2003 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? Quote Live as if you were to die tomorrow. Learn as if you were to live forever. Gandhi
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.