Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 SELECT ... IN (SELECT...)

Author  Topic 

caefer
Starting Member

10 Posts

Posted - 2003-08-19 : 05:13:59
Hi again.
(second post..)

I have some query like:

SELECT Name FROM Names WHERE Name LIKE "%@_T%" ESCAPE "@"


that one results in a list of names containing '_T' obviously.

now I need a query like

SELECT * FROM Jobs WHERE Name IN (SELECT Name FROM Names WHERE Name LIKE "%@_T%" ESCAPE "@")


that doesn't work..

is there a better way?
I'd like to have the first querty result kept in a variable and then make a select with that, since the Names Table won't get changed. possible?

thanks+regards
/christian

robvolk
Most Valuable Yak

15732 Posts

Posted - 2003-08-19 : 07:39:09
Please don't cross post:

http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=28566
Go to Top of Page
   

- Advertisement -