By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,717 Members | 1,268 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,717 IT Pros & Developers. It's quick & easy.

question about like

P: n/a
I have a table that looks like this

tbl1:
nvchValue nvarchar(100) NOT NULL
biVal1 bigint NOT NULL
biVal2 bigint NOT NULL

If I run this query against it:
SELECT nvchValue
FROM tbl1
WHERE nvchValue LIKE '%<%'

I get a result set that doesn't make any sense to me:
Term

-----
?
?
?
fr?it

Those values are in the database, but I don't understand how the match
is working. Any help would be appriciated.

Oct 7 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
It has to do with the collation you are using. Just like an 'a' is
considered equal to an 'A' in a collation that is not case sensitive,
the '<' is apparently considered equal to some of your ? characters.

If you explicitely mention Binary Collation in the WHERE clause, then
you will only get exact matches.

Gert-Jan
al*****************@yahoo.com wrote:

I have a table that looks like this

tbl1:
nvchValue nvarchar(100) NOT NULL
biVal1 bigint NOT NULL
biVal2 bigint NOT NULL

If I run this query against it:
SELECT nvchValue
FROM tbl1
WHERE nvchValue LIKE '%<%'

I get a result set that doesn't make any sense to me:
Term

-----
?
?
?
fr?it

Those values are in the database, but I don't understand how the match
is working. Any help would be appriciated.

Oct 7 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.