rtyrt

S

shrirang

rtyr

-----Original Message-----
From: Sylvain Lafontaine [mailto:sylvain aei ca (fill the blanks, no spam please)]
Posted At: Tuesday, June 28, 2005 2:55 AM
Posted To: microsoft.public.access.adp.sqlserver
Conversation: Add text to field with existing text
Subject: Re: Add text to field with existing text


The UPDATETEXT is to be used with field of type TEXT, NTEXT and IMAGE and
not to be used with field of type char, varchar, nchar or nvarchar.

It is also a statement that must be used separately from a Select statement
and must be given a binary pointer; something like:

DECLARE @ptrval binary(16)

SELECT @ptrval = TEXTPTR([T_SetupSheetHistoryOrderNotes].OrderNotes )
FROM [T_SetupSheetHistoryOrderNotes]
WHERE [T_SetupSheetHistoryOrderNotes].WOID=@WOID

UPDATETEXT [T_SetupSheetHistoryOrderNotes].OrderNotes @ptrval 0 0 @Reason

Please not that I did not test the above piece of code.

With fields of type other than TEXT, NTEXT and IMAGE, you should use the
regular update statement:

Update T_SetupSheetHistoryOrderNotes
SET OrderNotes = OrderNotes + @Reason
FROM [T_SetupSheetHistoryOrderNotes]
WHERE [T_SetupSheetHistoryOrderNotes].WOID=@WOID
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top