|
Posted by bbcworldtour on 04/16/07 10:15
(SQL Server 2005, express edition)
I have a list of table names that I need to translate according to a
naming convention. I'm doing this using pattern matching in a LIKE
clause.
In one specific case I get no match where I believe that there should
be one. I must be missing something obvious here, but what?
I have boiled it down to this example (the real one is more complex):
Matching on the first four characters I get a match:
select 'yes'
where 'TBAAA243_D_AFTBEL' like 'TBAA%';
----
yes
(1 row(s) affected)
That is fine, just as I would have expected. But if I try to match
only on the first 3 characters, I get this:
select 'yes'
where 'TBAAA243_D_AFTBEL' like 'TBA%';
(0 row(s) affected)
I have also tried the same on enterprise edition and get the same
strange result. Language is set to us_english
What am I missing here?
Any help appreciated, before I tear out the very last of my remaining
hair
Bo Brunsgaard
Navigation:
[Reply to this message]
|