My ZoneX

Waiting for Blogger Beta2!!

Thursday, December 29, 2005

SQL 2k Tips : UPDATETEXT

Thank you so much, Grace!


Sent: Tuesday, February 01, 2005 4:07 PM

Hi Micheal,

Do you know that ntext data type can’t do concatenation. To overcome this problem, we can use UPDATETEXT.
The following are the example of using UPDATETEXT.

DECLARE @ptrval binary(16)
Declare @strComments nvarchar(4000)

SET @strComments = 'comments'

SELECT @ptrval = TEXTPTR(rd.Comment)
FROM vyRequisitionDetails rd
WHERE rd.RequisitionID = 'REQPhyuHT02012005-Delhi'

UPDATETEXT vyRequisitionDetails.Comment @ptrval NULL 0 @strComments

Grace

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home