MS SQL Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsDatabasesMS SQL Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old October 6th, 2004, 12:01 AM
skidder skidder is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2003
Posts: 15 skidder User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via ICQ to skidder
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...

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesMS SQL Development > T-SQL and BLOBs


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway
Stay green...Green IT