Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

I have an oracle table with field type BLOB, length 4000, data type "2004". I know that this field simply contains some XML. How can I read the value of the BLOB, using an SQL select statement? Is there some conversion function to use? The same table/field in Sql Server is simply text.

share|improve this question
    
Why is this a BLOB (binary) column in Oracle and a text column in SQL Server? –  a_horse_with_no_name Oct 14 '11 at 21:55

1 Answer 1

This oracle package will do the job

select dbms_lob.substr(b,2000,1) from blobtest;

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.