Using SubQueries

From: Mark <marksmithy69_at_yahoo.com>
Date: 5 Jun 2002 13:18:46 -0700
Message-ID: <13e212f9.0206051218.622c775a_at_posting.google.com>


I am a beginner, so forgive me for the easy questions. How do I use a subquery in an if statement? For example, I want to write something like this...

If last_name NOT IN (Select last_name from People) then ...

Basically, I have a table which contains last names, and I want to compare it to the last name field in the People table. Whenever I try it, I get an error telling me that a subquery cannot be used in this context. Is there another way that I can do this? Thank you.

Mark Received on Wed Jun 05 2002 - 22:18:46 CEST

Original text of this message