|
Posted by Hugo Kornelis on 10/06/06 21:27
On 6 Oct 2006 12:46:15 -0700, asturt@us.ci.org wrote:
>However, if there is a less convoluted way of doing this, I'd love to
>know.
Hi asturt,
You can simplify it a bit using STUFF:
SELECT @MyString = STUFF(@MyString, CHARINDEX(CHAR(13), @MyString,
CHARINDEX(CHAR(13), @MyString, 0)+1), 2, '')
Note that the third (length) argument of the STUFF has to be 2, not 1,
because you have to replace both the CR and the LF.
--
Hugo Kornelis, SQL Server MVP
Navigation:
[Reply to this message]
|