WRITETEXT
May 15, 2002Is there an example of using writetext, please?
How do I add a row with a column of type IMAGE?
IMAGE column will hold a PDF file.
INSERT INTO Table (Image_Col) VALUES (....?)
Is there an example of using writetext, please?
How do I add a row with a column of type IMAGE?
IMAGE column will hold a PDF file.
INSERT INTO Table (Image_Col) VALUES (....?)
I need to update/change the text in a table column of data type TEXT.It's a smaller set of records (72) where I need to append onto the enda string of text, the same for all records.I don't quite understand how UPDATETEXT and WRITETEXT work, but hereis how I would write the Update query were the field not a TEXT type.Update Matters Set Description = Description + ' (Stylized)'
Quote:
In my stored procedure I need to do a WRITETEXT on some text data which is being returned from a READTEXT on other text data. I thought that this sort of thing would work:
DECLARE @comment varbinary(16)
DECLARE @comment_len int
DECLARE @comment_new varbinary(16)
...
SET @comment = TEXTPTR(atextcolumn) from atable where ...
SET @comment_len = DATALENGTH(atextcolumn) from atable where ...
SET @comment_new = TEXTPTR(anothertextcolumn) from anothertable where ...
WRITETEXT anothertextcolumn @comment_new READTEXT atextcolumn @comment 0 @comment_len
but I get the message from SQL Query Analyzer:
"Data stream missing from WRITETEXT statement."
I thought the READTEXT returned a data stream.
There must be a way to do what I want. Does anybody know what it is ?
Hi, I'm trying to store large strings to a database, so am using thetext field type (LongText). I have used this before when storing thehtml of a webpage, and was able to store more than 255 characters byusing just a normal update sql statement. Now I'm trying to store thebody of research papers, and must be doing something different, as Ican only store 255 characters.Can someone explain why SQL Server doesn't like what I am doing -should I be using the WriteText / UpdateText function? If so, pleaseexplain by example how I would do that, and why doing that works.Thanks so much,Iain
View 5 Replies View Related