You are here: Re: how to query for text containing parens? « MsSQL Server « IT news, forums, messages
Re: how to query for text containing parens?

Posted by Hugo Kornelis on 11/22/88 11:59

On 29 Sep 2006 20:31:59 GMT, Terry Olsen wrote:

>I figured out what the problem is, now how to come up with a solution.
>
>The problem seems to be that the last [space] is being represented with
>A0 instead of 20 in the database.
>
>How can I take that into account in my queries and return the data
>regardless of the byte value used for [space]?

Hi Terry,

Short-term solution:

WHERE REPLACE (SongName, CHAR(160), ' ') = 'John Jacob (Jingleheimer
Schmidt)'

Downside is that an index on the SongName column (if there is any) can't
be used as effectively.


Long-term solution: fix the front end or the stored proc that handles
data entry to convert char(A0) to space (= fixing the leak), then run an
update to convert existing data (= mopping up the floor).

--
Hugo Kornelis, SQL Server MVP

 

Navigation:

[Reply to this 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

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