Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase 12»»

Will SQL Server 2014 Support to Read BLOB (Byte Array) Expand / Collapse
Author
Message
Posted Thursday, December 12, 2013 8:40 PM
Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Today @ 12:55 AM
Points: 332, Visits: 1,121
Hi,
Will SQL Server 2014 Support to Read BLOB.
As we see in oracle we have some concept called DBMS_LOB.
Where the byte array data are stored in a BLOB data type and based on the size we can read the data and convert it to the number or float or what ever data type.
In oracle there are some utilities are there utl_raw.cast_from to read or write the byte array.
Do SQL server is having those functions?
If not is SQL Server having plan to do so?

Thanks!

Wish u all Happy Christmas in advance.....!

Post #1522558
Posted Thursday, December 12, 2013 9:46 PM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Thursday, May 15, 2014 5:11 PM
Points: 6,067, Visits: 5,283
You can do some conversion from varbinary(max). But I guess the question is, what are you trying to do? What is your goal?

CEWII
Post #1522565
Posted Friday, December 13, 2013 3:51 AM


SSCoach

SSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoach

Group: General Forum Members
Last Login: Today @ 3:51 AM
Points: 15,517, Visits: 27,897
I'm not an Oracle person, so my understanding here may be grossly inadequate, but the short answer is No.

The longer answer is, I think, that you're doing lots and lots of CLOB and BLOB storage in Oracle to get around limitations in the VARCHAR and VARBINARY fields. We don't have those same limitations within SQL Server. So, as was noted, you can use VARBINARY(MAX) or VARCHAR(MAX) to store large binary or text objects, but still have the full functions associated with those data types. There wouldn't then be a need for all the functions associated with DBMS_LOB.


----------------------------------------------------
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood..." Theodore Roosevelt
The Scary DBA
Author of: SQL Server 2012 Query Performance Tuning
SQL Server 2008 Query Performance Tuning Distilled
and
SQL Server Execution Plans

Product Evangelist for Red Gate Software
Post #1522620
Posted Saturday, December 14, 2013 8:44 AM
Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Today @ 12:55 AM
Points: 332, Visits: 1,121
as i said i need to split byte-array based on the size.

say there are 3 columns in a table.
i am having the information in the byte array format
i need to extract those format and insert in to the table.
for first column 4 bytes second column 2 bytes third 8 bytes.
Post #1522951
Posted Saturday, December 14, 2013 7:45 PM


SSC-Dedicated

SSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-Dedicated

Group: General Forum Members
Last Login: Today @ 1:55 PM
Points: 36,749, Visits: 31,197
yuvipoy (12/14/2013)
as i said i need to split byte-array based on the size.

say there are 3 columns in a table.
i am having the information in the byte array format
i need to extract those format and insert in to the table.
for first column 4 bytes second column 2 bytes third 8 bytes.


What is the ultimate datatype of those 3 columns?


--Jeff Moden
"RBAR is pronounced "ree-bar" and is a "Modenism" for "Row-By-Agonizing-Row".

First step towards the paradigm shift of writing Set Based code:
Stop thinking about what you want to do to a row... think, instead, of what you want to do to a column."

(play on words) "Just because you CAN do something in T-SQL, doesn't mean you SHOULDN'T." --22 Aug 2013

Helpful Links:
How to post code problems
How to post performance problems
Post #1523004
Posted Sunday, December 15, 2013 9:24 AM
Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Today @ 12:55 AM
Points: 332, Visits: 1,121
Jeff Moden (12/14/2013)
yuvipoy (12/14/2013)
as i said i need to split byte-array based on the size.

say there are 3 columns in a table.
i am having the information in the byte array format
i need to extract those format and insert in to the table.
for first column 4 bytes second column 2 bytes third 8 bytes.


What is the ultimate datatype of those 3 columns?


So what ever it may be it may be Int , float, Bigint

or even varchar
String data conversion to a varchar data type in DB
the bytearray will be having float,smallint,bigint
or
the bytearray will be having float,smallint,String with 8 bytes
is there option to split based on the size...?


Post #1523047
Posted Sunday, December 15, 2013 10:27 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Today @ 11:44 AM
Points: 7,019, Visits: 12,915
can you provide a test scenario so we can better understand what you're trying to do?



Lutz
A pessimist is an optimist with experience.

How to get fast answers to your question
How to post performance related questions
Links for Tally Table , Cross Tabs and Dynamic Cross Tabs , Delimited Split Function
Post #1523050
Posted Sunday, December 15, 2013 1:08 PM


SSC-Dedicated

SSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-Dedicated

Group: General Forum Members
Last Login: Today @ 1:55 PM
Points: 36,749, Visits: 31,197
yuvipoy (12/15/2013)
Jeff Moden (12/14/2013)
yuvipoy (12/14/2013)
as i said i need to split byte-array based on the size.

say there are 3 columns in a table.
i am having the information in the byte array format
i need to extract those format and insert in to the table.
for first column 4 bytes second column 2 bytes third 8 bytes.


What is the ultimate datatype of those 3 columns?


So what ever it may be it may be Int , float, Bigint

or even varchar
String data conversion to a varchar data type in DB
the bytearray will be having float,smallint,bigint
or
the bytearray will be having float,smallint,String with 8 bytes
is there option to split based on the size...?




There's a reason why these things are called "BLOBS". Splitting fixed length, fixed field blobs is nearly trivial if you know the "record layout" but when you add VARCHAR or any other variable length datatype to the mix, it isn't going to work unless there's an embedded delimiter in the data or something that identifies the start of each field for every row.


--Jeff Moden
"RBAR is pronounced "ree-bar" and is a "Modenism" for "Row-By-Agonizing-Row".

First step towards the paradigm shift of writing Set Based code:
Stop thinking about what you want to do to a row... think, instead, of what you want to do to a column."

(play on words) "Just because you CAN do something in T-SQL, doesn't mean you SHOULDN'T." --22 Aug 2013

Helpful Links:
How to post code problems
How to post performance problems
Post #1523061
Posted Sunday, December 15, 2013 9:04 PM
Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Today @ 12:55 AM
Points: 332, Visits: 1,121
Jeff Moden (12/15/2013)
There's a reason why these things are called "BLOBS". Splitting fixed length, fixed field blobs is nearly trivial if you know the "record layout" but when you add VARCHAR or any other variable length datatype to the mix, it isn't going to work unless there's an embedded delimiter in the data or something that identifies the start of each field for every row.


There are no embedded delimiter only byte size is there.
Only byte len is the starting point of every column.
Based on the BYTE sizeneed to split the BLOB.
Post #1523078
Posted Sunday, December 15, 2013 10:31 PM
Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Today @ 12:55 AM
Points: 332, Visits: 1,121
Some thing like
http://www.java2s.com/Tutorial/Oracle/0660__Large-Objects/0080__CLOB.htm
Byte array to number

Thanks!
Post #1523082
« Prev Topic | Next Topic »

Add to briefcase 12»»

Permissions Expand / Collapse