
October 6th, 2004, 12:01 AM
|
|
Registered User
|
|
Join Date: Aug 2003
Posts: 15
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
|
T-SQL and BLOBs
I have a table with a bunch of NTEXT columns apparently containing only large pieces of ASCII-7 data. I'm trying to create a trigger which concatenates them and places the result into IMAGE column in a row of the table in another database.
The question is how do I concatenate BLOBs in T-SQL?
Is it possible to put result of READTEXT into a variable?
Or I am supposed to do repeated SELECT statements like this:
select @chunk = substring(@blobfield, @pos, 4000) from ...
while(len(@chunk) < 4000)
begin
select @chunk = substring(@blobfield, @pos, 4000) from ...
....
set @pos = @pos + 4000
end
This doesn't look like beautiful... If any aspect of MS T-SQL language design may ever look beautiful...
|