Sorry, not that competent at SQL yet - Help please!
If this is my standard stored procedure, where Description is the column i wish to remove the HTML from:
===========================================================
ALTER PROCEDURE GetAnnouncements
(
@ModuleID int,
)
AS
SELECT
ItemID,
CreatedByUser,
CreatedDate,
Title,
ExpireDate,
Description
FROM
Announcements
WHERE
ModuleID = @ModuleID
AND
ExpireDate > GetDate()
===========================================================
How do i incorporate this code into it:
===========================================================
While charindex('<',@str)>0
Begin
Set @str = stuff(@str, charindex('<',@str),
charindex('>',@str) - charindex('<',@str) + 1, '')
End
===========================================================
I understand now what the loop is doing, just don't know how/where to declare @str, and how to relate it to my returned Description rows.
cheers,
si