Subject extracting text from a blob...
Author Rasmus Olesen
Hi

I need to extract the first 1000 chars or so from a BLOB(1) (ie. subtype 1)
and put them in a varchar(1000). How do one do that the smartest way...??

Oh, yeah, and i need to do in a stored procedure, so can't use any cursors
:-(

If CAST() ate BLOBs, i think it would look like this :

select CAST(myBlobColumnName AS varchar(1000))....

..if i assume it would cut the blob i half and keep the LEFT part

or if substring or the likes, worked :

select subblob(myBlobColumnName, 0, 1000)....

But i really can't think of a way to do this without doing it with a
hardcore UDF trick-function or so.....

regards.
/Rasmus Olesen
Denmark



[Non-text portions of this message have been removed]