|
|
|
Ten Centuries
      
Group: General Forum Members
Last Login: Thursday, April 19, 2012 10:25 PM
Points: 1,231,
Visits: 3,483
|
|
Adequate and nice to learn To get the exact result
select * from #Like_Test where Col1 Like '%Cu[_]%'
‘_’ is escape so [_] is the valuable one
|
|
|
|
|
SSC-Dedicated
           
Group: General Forum Members
Last Login: Today @ 12:38 AM
Points: 37,725,
Visits: 29,981
|
|
Or
select * from #Like_Test where Col1 Like '%Cu/_%' ESCAPE '/'
Gail Shaw Microsoft Certified Master: SQL Server 2008, MVP SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
We walk in the dark places no others will enter We stand on the bridge and no one may pass
|
|
|
|
|
Valued Member
      
Group: General Forum Members
Last Login: Sunday, February 26, 2012 1:57 AM
Points: 57,
Visits: 32
|
|
Try this to get the records start with "Cu_"
select * from #Like_Test where Col1 Like 'Cu[_]%'
|
|
|
|
|
Ten Centuries
      
Group: General Forum Members
Last Login: Sunday, May 19, 2013 11:16 PM
Points: 1,061,
Visits: 1,151
|
|
good basic question of LIKE.. I like it
|
|
|
|