|
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]
|