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 |
|
qman
Constraint Violating Yak Guru
442 Posts |
Posted - 2008-01-15 : 11:23:46
|
| Is it possible to perform a LIKE of the first 10 characters of a column? Say company_name? |
|
|
TG
Master Smack Fu Yak Hacker
6065 Posts |
Posted - 2008-01-15 : 11:42:05
|
| you mean this?where company_name like 'Microsoft C%'Be One with the OptimizerTG |
 |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2008-01-15 : 11:53:00
|
left(comany_name, 10) like @search + '%' KH[spoiler]Time is always against us[/spoiler] |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2008-01-16 : 01:34:49
|
quote: Originally posted by qman Is it possible to perform a LIKE of the first 10 characters of a column? Say company_name?
Obviously End result would be what TG's would returnUse his approach if you want to make use of index if defined on company_nameMadhivananFailing to plan is Planning to fail |
 |
|
|
|
|
|