SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 Using WRITETEXT to update text fields
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

krugg
Starting Member

12 Posts

Posted - 10/18/2005 :  07:53:52  Show Profile  Reply with Quote
Hi,
The following code is fine for updating a text field for one record in a temp table....

---------------------------------------
update #tmpRecords set details = null

DECLARE @ptrval binary(16)
SELECT @ptrval = TEXTPTR(details) from #tmpRecords where recordId = 1

WRITETEXT #tmpRecords.details @ptrval 'valueEntered'
---------------------------------------

But how can I update each of the records in the table #tmpRecords all at once? Eg there could be 100 rows that need updating

This doesn't work but here's the SQL pseudocode:

Update #tmpRecords set details = WRITETEXT #tmpRecords.details @ptrval select details from tableThatHasTheValues


Thanks for any suggestions.....
Krugg

madhivanan
Premature Yak Congratulator

India
22754 Posts

Posted - 10/18/2005 :  08:00:01  Show Profile  Send madhivanan a Yahoo! Message  Reply with Quote
Refer UPDATETEXT in BOL
Refer this also
http://www.nigelrivett.net/SQLTsql/InsertTextData.html

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.05 seconds. Powered By: Snitz Forums 2000