Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to retrieve data from an Oracle BLOB

Status
Not open for further replies.

UncleScooby

Programmer
Jun 1, 2001
30
GB

If anybody can help with this I would greatly appreciate.

Can it be done via sql plus ?!?

The BLOB contains named value pairs (i.e. txt)

I am trying with toadfor free but not sure how to do it
within this utility either.

any info appreciated.

US.
 
No, you cannot display BLOB data in SQL*Plus, which is a text-only tool. Oracle does not know you encapsulated pure text in a binary. When the data is fetched, it is fetched as a binary stream and not parsed into text. Use a 3GL program for that.

You can display the first chunk of CLOB data in SQL*Plus, provided you use the SET LONG command appropriately. However, I think you are limited to the first 2000 characters regardless of how big your CLOB is.


MarkRem
OCP 10g/9i
 
Actually, Gents, I just successfully displayed, from SQL*Plus, the contents of a CLOB field whose length is 512,000:
Code:
select length(x) from clobber;

    512000

1 row selected.

set long 1000000
select * from clobber;

xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
.
.
.

[santa]Mufasa
(aka Dave of Sandy, Utah, USA)
@ 17:16 (22Feb05) UTC (aka "GMT" and "Zulu"),
@ 10:16 (22Feb05) Mountain Time

Do you use Oracle and live or work in Utah, USA? Then click here to join Utah Oracle Users Group on Tek-Tips.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top