I have 2 tables tblCOMPANY and tblCOMPANY_ACCESS. TBL_COMPANY has COMPANYID and Sales_Division. tblCOMPANY_ACCESS has COMPANYID and USERID. I need to Delete all records in tblCOMPANY_ACCESS where tblCOMPANY.SALES_DIVISION='Enterprise' and TBL_COMPANY_ACL.USERID='1234'
I tried the following but all records were deleted. yikes!
DELETE FROM tblCOMPANY_ACCESS
WHERE EXISTS
(SELECT COMPANYID,'1234'
FROM tblCOMPANY
WHERE SALES_DIVISION='Enterprise')
any help is greatly appreciated.
I tried the following but all records were deleted. yikes!
DELETE FROM tblCOMPANY_ACCESS
WHERE EXISTS
(SELECT COMPANYID,'1234'
FROM tblCOMPANY
WHERE SALES_DIVISION='Enterprise')
any help is greatly appreciated.