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 |
Shadab Shah
Starting Member
23 Posts |
Posted - 2012-07-23 : 01:55:03
|
Hi,Suppose following are the content of my table,empnameabc%defxyzpqrmnopqrst%vwxi would like to fire a query which would give me the output asempnameabc%defst%vwx |
|
webfred
Master Smack Fu Yak Hacker
8781 Posts |
Posted - 2012-07-23 : 02:20:39
|
try:where empname like '%[%]%' No, you're never too old to Yak'n'Roll if you're too young to die. |
 |
|
Bill_C
Constraint Violating Yak Guru
299 Posts |
Posted - 2012-07-23 : 02:22:43
|
I think it's something like:-SELECT empname from table1 WHERE empname LIKE '%[%]%' |
 |
|
Bill_C
Constraint Violating Yak Guru
299 Posts |
Posted - 2012-07-23 : 02:23:07
|
oops, beat me to it - lolAny special characters being searched on go inside square brackets. |
 |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2012-07-23 : 10:55:44
|
alsoSELECT empname from table1 WHERE empname LIKE '%!%%' ESCAPE '!'; ------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
|
|
|