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

Home -> Community -> Mailing Lists -> Oracle-L -> Re: urgent???????

Re: urgent???????

From: Vadim Gorbunov <dim_at_protek.ru>
Date: Mon, 26 Jun 2000 14:30:02 +0400
Message-Id: <10540.110393@fatcity.com>


This is a multi-part message in MIME format.

--------------D3AF72B91954690293B1B78E
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Hi Mohamed, try DBMS_SQL

Vadim Gorbunov
Oracle DBA

Mohamed Gad wrote:

> Dear all
> I have a problem and I do not what to do.
> my problem is:
> I have a table of 2 columns id number, text(contains text) long raw
> I want to select a specific text from the table and convert it to varchar2
> and write it to file
> so I create the following procedure.
>
> procedure test1 is
> mm long raw;
> xx long raw;
> I UTL_FILE.FILE_TYPE;
> begin
> I := UTL_FILE.FOPEN ( 'c:\bassem\','test.txt' ,'w');
> select text into mm from om_sqltext_info where id=15972;
> /* I WANT TO TAKE A PART OF THE LONG RAW BECAUSE IT IS GREATER THAN 32760 */
> xx:=utl_raw.SUBSTR (mm,1,200);
> UTL_FILE.PUT(i,utl_raw.cast_to_varchar2(xx));
> UTL_FILE.FCLOSE(i);
> end;
>
> but when I run this procedure I get the next error
>
> ERROR at line 1:
> ORA-06502: PL/SQL: numeric or value error
> ORA-06512: at "SYS.UTL_RAW", line 299
> ORA-06512: at "WORKBENCH.TEST1", line 8
> ORA-06512: at line 1
>
> I do not what is cause if any one know please replay as soon as possible.
>
> note:
> when I run this procedure on smaller text (the text size is smaller than
> 32760) so there is no need to xx:=utl_raw.SUBSTR (mm,1,200);
> in this case the procedure succeeded and write to file.
>
> Best Regards
> Mohamed Gad
> ITSoft, The software Factory of International Turnkey Systems (ITS)
>
> 16 Lebanon st., Mohandeseen, Giza, Egypt
> Tel: +20-2-3048561/2/3
> Fax: +20-2-3048564
> email: mgad_at_itsoft.com.eg
> URL: www.itsoft.com.eg
>
> --
> Author: Mohamed Gad
> INET: mgad_at_itsoft.com.eg
>
> Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051
> San Diego, California -- Public Internet access / Mailing Lists
> --------------------------------------------------------------------
> To REMOVE yourself from this mailing list, send an E-Mail message
> to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
> the message BODY, include a line containing: UNSUB ORACLE-L
> (or the name of mailing list you want to be removed from). You may
> also send the HELP command for other information (like subscribing).

--------------D3AF72B91954690293B1B78E
Content-Type: text/x-vcard; charset=us-ascii;  name="dim.vcf"

Content-Transfer-Encoding: 7bit
Content-Description: Card for Vadim Gorbunov
Content-Disposition: attachment;

 filename="dim.vcf"

begin:vcard
n:Gorbunov;Vadim
tel;work:(095)737-3533
x-mozilla-html:FALSE

url:www.protek.ru
org:Protek;IT
adr:;;;Moscow;;;Russia

version:2.1
email;internet:dim_at_protek.ru
title:Oracle DBA Received on Mon Jun 26 2000 - 05:30:02 CDT

Original text of this message

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