Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: How to save LONG RAW to file

Re: How to save LONG RAW to file

From: Sebastian Bienkiewicz <bienkiew_at_bph.krakow.pl>
Date: Wed, 21 Apr 1999 11:57:43 +0200
Message-ID: <371DA117.C0DC706E@bph.krakow.pl>


In that way it's impossible, 'cause SQL*Plus tries to covert LONG RAW to CHAR and this conversion products ORA-00932 error. You must create PL/SQL function and use UTL_RAW package to do this (see $ORACLE_HOME/rdbms/admin/utlraw.sql file for more details).

Regards,
Sebastian.

> doc_name varchar2(20)
> document long raw
>
> This table is populated using a client application developed with Power
> Builder.
> Every evening I need to save the contents of this table to disk.
> What follow is part of an Unix script I wrote:
>
> for RIGA in `cat $sqlspl`
> do
> sqlplus -s $uspw <<+++ > $sqllog 2>&1
> set heading off
> set feedback off
> set pagesize 0
> spool $RIGA
> SELECT document from table where doc_name = ‘$RIGA’
> /
> exit
> +++
> done
>
> Where $sqlspl is a file containing the name of the files I need to
> generate.
>
> Running this script I receive the following error (this is the content
> of every file generated):
> ERROR:
> ORA-00932: inconsistent datatypes
>
> OS: UnixWare.
> Oracle 7.2.2
Received on Wed Apr 21 1999 - 04:57:43 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US