Reply to Re: Unexpected LIKE behavior

Your name:

Reply:


Posted by Ed Murphy on 04/22/07 06:01

Dimitri Furman wrote:

> SQL Server 2000 SP4.
>
> Running the script below prints 'Unexpected':
>
> -----------------------------
> DECLARE @String AS varchar(1)
>
> SELECT @String = 'z'
>
> IF @String LIKE '[' + CHAR(32) + '-' + CHAR(255) + ']'
> PRINT 'Expected'
> ELSE
> PRINT 'Unexpected'
> -----------------------------
>
> If the @String variable is set to 'y' (or in fact any ANSI character other
> than 'z'), the result is 'Expected'. The comparison also evaluates as
> expected if CHAR(255) is replaced with CHAR(254). The server collation, if
> that matters, is SQL_Latin1_General_CP1_CI_AS.
>
> It would be helpful to find the explanatin of this behavior. Thanks.

CHAR(255) = 'y' with an umlaut
http://englishplus.com/xascii.htm

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация