Reply to Re: Removing white spaces in a varchar column

Your name:

Reply:


Posted by Rad on 09/15/05 20:15

Thanks Stu, you made my day. :)

It was a line break after a white space. I was concentrating only on
the white space and did not notice the line break. So in my first
statement, I first use this query:

UPDATE customers
SET AccountNumber = substring(AccountNumber, 1, PATINDEX('CHAR(13)',
AccountNumber))
WHERE AccountNumber like '%' + CHAR(13)

and it worked!

Thanks again!

Regards,
Rad

Stu wrote:
> Are you sure it's a whitespace? It might be a line break. To verify,
> you might try something like:
>
> SELECT AccountNumber
> FROM customers
> WHERE AccountNumber LIKE '%" + CHAR(10)
> OR AccountNumber LIKE '%' + CHAR(13)
>
> Oh, and always be cautious about running an UPDATE statement with no
> WHERE clause.
>
> HTH,
> Stu

[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

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