SQLTeam.com | Weblogs | Forums

BLOB format field


#1

I am fairly new to T-SQL and have a challenging task.

I need to extract some records off a sql table, and one of the fields is a BLOB. The table holds all attachments for a main table. I need to be able to read the blob field as we are losing this particular sql server.

Just extracting the raw data takes an eternity, without converting the Blob to a readable text field.
Any pointers at this stage would be greatly appreciated

Reg
Ash


#2

please post:

  1. CREATE TABLE statement for the table you are trying to read
  2. The query you are running that takes an eternity.

#3

Thank you for a quick response, much appreciated.

I did google in the Blob and saw that a CREATE statement had to be used also, but I dont have the know-how on the Blob handling.

All I have is a vanilla extract as below:

use SDE
select [BAAN ERP].[incident].[Incident #],
[Open Date & Time],
[Login ID Opened By],
[Login ID Assigned To],
[Status Description:],
[Subject Description],
[Subject ID],
[Incident Description],
[Incident Resolution],
[BAAN ERP].[Attachments].[FileName],
[FileBlob]
FROM [BAAN ERP].[Incident]
FULL JOIN [BAAN ERP].[Attachments]
ON [BAAN ERP].[Attachments].[Seq.incident:] = [BAAN ERP].[incident].[incident #]

where [BAAN ERP].[incident].[Subject Id] like 'BS%'

All I want is the for the Blob to be converted to a readable format

Thank you
ash


#4

Do you have indexes on [BAAN ERP].[Attachments].[Seq.incident:], [BAAN ERP].[incident].[incident #] and [BAAN ERP].[incident].[Subject Id] like 'BS%'

?

If not, that could be the reason for the slow run time.

Also, what format is the FileBlob column? Image? Word Doc? Excel Spreadsheet? Something else? You need to know that before you figure out what "readable format" means.