I'm using this code in SQL Server 2005 and it works.
select name
from customers
where code = (select code from inventory where Active = 1)
How can I do this in SQL Server 2000?
Use IN..With = If there is more than one code ,your query will fail
select name from customers where code in (select code from inventory where Active=1)