"Jonathan Woods" <ye******@gmail.comwrote in message
news:f5**********************************@25g2000p rz.googlegroups.com...
How do I determine if data exists from multiple tables in SQL Server
2000?
For example,
IF EXISTS
(
( SELECT ColA FROM TableA WHERE ... ) AND
( SELECT ColB FROM TableB WHERE ... )
)
BEGIN
-- Need to do something here
END
Rewrite it as
IF Exists (select...from TableA...) AND Exists (select...from
TableB...)
Another option would be
IF Exists (select... from TableA INNER JOIN TableB ON...)
You may get some better answers if you ask this question in a Sql Server
newsgroup instead of the C# one.