Returning a BLOB to Ksh


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Returning a BLOB to Ksh
# 1  
Old 05-11-2007
Returning a BLOB to Ksh

Hello,

I am currently using a small script to test out part of a larger script I will use llater on. I am querying Oracle 10.1 to return a column which holds a blob value. This value needs unzipped, sent to a file or piped and then amended and re-inserted to another table with the news values. When I run the small test script below I get this error:

Code:
SP2-0678: Column or attribute type can not be displayed by SQL*Plus

Obviously it dosent dump a BLOB to stdout but thats my question I guess, how do I get the data from within the BLOB and unzip it to a file or pipe in SOLARIS?

Here is the small script I am using as a test
Code:
#!/usr/bin/ksh

function get_messages 
{
	   print " select msg_val from mqseries_store where msg_id = 3;
         " | user/pass@d > temp.txt
}

get_messages
wait
cat temp.txt

# 2  
Old 05-11-2007
I believe you will have to write something in a language that supports binary objects -
probably C or java, or Oracle Forms. Oracle stores these objects in binary format, so sqlplus doesn't know how to "display" them because the format could be anything - a zip file, jpeg, etc.
# 3  
Old 05-12-2007
Oracle (not shell) related, check this
Login or Register to Ask a Question

Previous Thread | Next Thread
Login or Register to Ask a Question