April 10, 2009 at 6:31 pm
Hi
I need to append the value for an existing text data type column value in sql 2000. Can someone give the scripts? I have to update for 300 records.
Thanks
Shuaib
April 11, 2009 at 3:44 am
Hi
In SQL Server 2000 I think there is no set based solution. You have to work with WRITETEXT function:
CREATE TABLE #t (Id INT, Txt TEXT)
INSERT INTO #t
SELECT 1, 'Hello '
DECLARE @ptr BINARY(16)
DECLARE @offset INT
SELECT @ptr = TEXTPTR(Txt), @offset = DATALENGTH(Txt)
FROM #t
WHERE Id = 1
UPDATETEXT #t.Txt @ptr @offset 0 'World'
GO
SELECT * FROM #t
GO
GO
DROP TABLE #t
Please correct me if I'm wrong.
Greets
Flo
April 11, 2009 at 4:06 am
Shuaib (4/10/2009)
HiI need to append the value for an existing text data type column value in sql 2000. Can someone give the scripts? I have to update for 300 records.
Thanks
Shuaib
For editing text it would be logical to use a text editor.
Transactional Structured Query Language has nothing to do with this.
_____________
Code for TallyGenerator
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply