Lowell (5/10/2010)
it's actually easy..you can use multiple AND/OR statements with an IF:
IF NOT EXISTS(SELECT 1 FROM TABLEA WHERE ID=1)
AND NOT EXISTS(SELECT 1 FROM TABLEB WHERE ID=1)
BEGIN
--do stuff
END
I actually want to show the rows in TableB, if they do not exist in TableA, however, I need to join TableC and TableB in a way to check and see if a condition is met within TableC and TableB, such as say TableC.fieldname = 'Y' and TableB.fieldname is null