Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using result set and setting it to another select statement

Status
Not open for further replies.

gio2888

Technical User
Oct 26, 2000
64
US
This might be confusing, I will do my best to describe my problem. Heres the sql statement I am running...

select * from portal P, portal_title C where P.category = C.category AND (name like '%is%' or portal_keywords like '%is%')

I want to take one field from the recordset, and input it as a search variable in another select statement.

select * from portal_main where name= <--- place the one of the result fields there....

Is there a way I can consolidate the 2 sql statements together?

Thanks for the help!
 
Code:
select * from portal_main where name in (
select <apropriate-column> 
  from portal P, portal_title C 
where P.category = C.category 
AND (name like '%is%' or 
portal_keywords like '%is%'))
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top