Link to home
Start Free TrialLog in
Avatar of zimmer9
zimmer9Flag for United States of America

asked on

How to revise an Access 2003 query into a SQL Server 2008 SQL statement?

I have the following Access 2003 query that I am trying to convert to a SQL Server 2008 equivalent:

Access 2003 Query

SELECT B.entity, SV.bank, SV.userid, SV.dtCreated, SV.chkNum,
SV.branch, SV.chkDt, SV.accountNum, SV.amount, SV.typeSV
FROM tbl_CSL_Bank AS B INNER JOIN tbl_CSL_StopVoidPay AS SV ON
B.bankID = SV.bank
WHERE (((SV.typeSV)='S') AND ((Exists (SELECT userID FROM tbl_CSL_Users AS U WHERE
SV.userid = U.userID))=False))
ORDER BY SV.chkNum;


The following statement I created does not filter out records where "SV.userid <> U.userID".
Do you know how this query could be revised to accomplish this?

SELECT B.entity, SV.bank, SV.userid, SV.dtCreated, SV.chkNum,
SV.branch, SV.chkDt, SV.accountNum, SV.amount, SV.typeSV
FROM tbl_CSL_Bank AS B INNER JOIN tbl_CSL_StopVoidPay AS SV ON
B.bankID = SV.bank
WHERE ((SV.typeSV)='S') AND ((Exists (SELECT userID FROM tbl_CSL_Users AS U WHERE
SV.userid <> U.userID)))
ORDER BY SV.userid, SV.chkNum;
ASKER CERTIFIED SOLUTION
Avatar of Ryan Chong
Ryan Chong
Flag of Singapore image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial