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.
| Author |
Topic |
|
zubair
Yak Posting Veteran
67 Posts |
Posted - 2004-07-22 : 09:49:38
|
| Hi i have the following query which works fine. The subquery returns me 2 valuesBuntingWindow Clingnow what i want is to do in the first query a LIKE instead of an IN.At the moment using the IN works fine, but when i substitute it with a LIKE i get an error.I've pasted my code below. Can anyone help? Thanksselect * from csa.dbo.elementlookup where element in (SELECT CSA.dbo.ElementLookup.ElementFROM creativeBOM INNER JOIN CSA.dbo.ElementLookup ON creativeBOM.elementId = CSA.dbo.ElementLookup.ElementIDWHERE creativeBOM.filmId = 5162 AND creativeBOM.countryId = 362) |
|
|
derrickleggett
Pointy Haired Yak DBA
4184 Posts |
Posted - 2004-07-22 : 09:54:57
|
| LIKE only works with single values and must have a wildcard in it somewhere to work. Why don't you explain what you are trying to achieve like this? Do you want things spelled similarly? Do you want things that are similar sounding? Do you want it where the first part of the string is similar? Give us some sample data and show us what you are trying to achieve.MeanOldDBAderrickleggett@hotmail.comWhen life gives you a lemon, fire the DBA. |
 |
|
|
|
|
|