Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Simple LIKE with wildcard


Simple LIKE with wildcard

Author
Message
gserdijn
gserdijn
Ten Centuries
Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)

Group: General Forum Members
Points: 1341 Visits: 816
First thought: How can values like 'AA' be found with LIKE '_' ?

Zero rows. Click. Zero points.

Next time I will wait for the caffeine to do its work. I learned something, hope I remember it when I need it. ;-)



Dutch Anti-RBAR League
honza.mf
honza.mf
SSCommitted
SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)

Group: General Forum Members
Points: 1771 Visits: 1323
gserdijn (5/27/2010)
First thought: How can values like 'AA' be found with LIKE '_' ?

Zero rows. Click. Zero points.

Next time I will wait for the caffeine to do its work. I learned something, hope I remember it when I need it. ;-)

I was surprised too. I watched it after one of my coworkers came with a question: "How it is possible, this query returned this data?" His pattern was little bit more complicated, something like '__[_]_[_][[]%'.
And the best point: I could write a question with "It depends" option:-)



See, understand, learn, try, use efficient
© Dr.Plch
UMG Developer
UMG Developer
SSCrazy
SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)SSCrazy (2.3K reputation)

Group: General Forum Members
Points: 2280 Visits: 2204
I almost picked "It Depends" because, but I thought no, it couldn't be possible with a standard VARCHAR. Learned another thing today, at the cost of a point. :-)
TomThomson
TomThomson
SSChampion
SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)

Group: General Forum Members
Points: 10700 Visits: 11991
A beautiful question, which may have made some of the backwoodsmen notice that there are collations other than the one which fits US ASCII perfectly and fits nothing else. But I'm not holding my breath while waiting for the average US (or should that be "U/S"?) DBA or DB designer to notice our weird "foreign" collation stuff.

Tom

honza.mf
honza.mf
SSCommitted
SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)

Group: General Forum Members
Points: 1771 Visits: 1323
Tom.Thomson (9/22/2010)
A beautiful question, which may have made some of the backwoodsmen notice that there are collations other than the one which fits US ASCII perfectly and fits nothing else. But I'm not holding my breath while waiting for the average US (or should that be "U/S"?) DBA or DB designer to notice our weird "foreign" collation stuff.


Thank you.



See, understand, learn, try, use efficient
© Dr.Plch
scottm30
scottm30
Say Hey Kid
Say Hey Kid (673 reputation)Say Hey Kid (673 reputation)Say Hey Kid (673 reputation)Say Hey Kid (673 reputation)Say Hey Kid (673 reputation)Say Hey Kid (673 reputation)Say Hey Kid (673 reputation)Say Hey Kid (673 reputation)

Group: General Forum Members
Points: 673 Visits: 383
Great question, thanks!
I lost a point here, but it was well worth it as I hadn't even considered collation when I answered.
TomThomson
TomThomson
SSChampion
SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)

Group: General Forum Members
Points: 10700 Visits: 11991
crussell-931424 (6/11/2014)
How did I miss this one?

Judging by your comment posted Tuesday, May 25, 2010 2:33 PM the answer to that question is pretty obvious, but in the interests of being polite I will omit supplying that answer.

Tom

Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search