Jump to content

subselect with wildcard


balikian

Recommended Posts

I've got one table with with an compID, say "12345". I need to query another table which has a compCode with values based on the compID of the other table, so something like:12345_112345_212345_312345_4So I want to do something like:select * from TABLE where compCode like '(select compID from FIRSTTABLE where ID = '99999')%'But this doesn't work. Basically, I want to add a wildcard (%) to the end of a subselect. Is this possible? I've dug through all my books and can't find it. I'm fairly new to SQL. So there must be another way to do this. Thanks.scottp.s. this is my first time posting to this forum and one dealing with SQL, so hopefully I've explained what I am doing properly.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...