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 |
|
squarefish
Starting Member
28 Posts |
Posted - 2009-08-03 : 04:13:22
|
| Hi there,Is it poosible to have 2 tables joined on a like rather than equals?I have two tables one contains descriptive colours like metallic steel silver, chilli Red, and the other has red, silver, black, blue etc.I want to be able to say chilli red = red, metallic steel silver = silver.Is there a way of achieving this??Many ThanksRichard |
|
|
bklr
Master Smack Fu Yak Hacker
1693 Posts |
Posted - 2009-08-03 : 04:38:22
|
| use like or patindex |
 |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2009-08-03 : 05:09:15
|
[code]from table1 t1 inner join table2 t2 on t1.color like '%' + t2.color + '%'[/code] KH[spoiler]Time is always against us[/spoiler] |
 |
|
|
squarefish
Starting Member
28 Posts |
Posted - 2009-08-03 : 05:52:36
|
| <-- Feels slightly stupid he didn't try that first! :-)Thanks! |
 |
|
|
|
|
|