Re: Breaking integers into bytes in PL/SQL?

From: Thomas Kyte <tkyte_at_us.oracle.com>
Date: Thu, 18 Nov 1999 08:34:28 -0500
Message-ID: <EwA0ODFzpp6mZ2KMwWiX7DyUU4Zf_at_4ax.com>


A copy of this was sent to Jan-Helge Bergesen <jhb_at_protek.no> (if that email address didn't require changing) On Thu, 18 Nov 1999 13:18:52 +0100, you wrote:

>Hi.
>
>What we try to do is this:
> Based upon some values in the DB a SNP job shall determine some
> values and send these values over a named pipe (using UTL_FILE)
> to an external process.
> The process runs on the same machine as the Oracle server (v.7.3.x on
> a Sun Enterprise )
> What we'd like is to send the data as machine dependent integers
>directly
> through the pipe to the external process.
> We build upon an older partial solution that uses embedded SQL in yet
> another external process, but by using named pipes we would reduce
> the expansion of both the external- and internal procedures/processes
> considerably.
>
>As an interim solution we'll go for strings that will be converted in
>the external process..

UTL_FILE can only write text -- if you attempt to send binary information through it -- it'll not work. Even though we could generate a plsql routine to write a native integer -- utl_file will not support it. Strings will be the only way to do it successfully in 7.3

>
>Thomas Kyte wrote:
>>
>> A copy of this was sent to Jan-Helge Bergesen <jhb_at_protek.no>
>> (if that email address didn't require changing)
>> On Wed, 17 Nov 1999 15:43:25 +0100, you wrote:
>>
>> >Can it be done?
>> >
>> >It sure would save us quite some work..
>>
>> what are you trying to do? can you give an example of what you want?
>>
>> numbers in Oracle are stored in a device independent format -- and maybe upto 22
>> bytes in length. there probably is some way to do what you want if we know what
>> it is...
>>
>> --
>> See http://osi.oracle.com/~tkyte/ for my columns 'Digging-in to Oracle8i'...
>> Current article is "Part I of V, Autonomous Transactions" updated June 21'st
>>
>> Thomas Kyte tkyte_at_us.oracle.com
>> Oracle Service Industries Reston, VA USA
>>
>> Opinions are mine and do not necessarily reflect those of Oracle Corporation

-- 
See http://osi.oracle.com/~tkyte/ for my columns 'Digging-in to Oracle8i'...
Current article is "Part I of V, Autonomous Transactions" updated June 21'st
 
Thomas Kyte                   tkyte_at_us.oracle.com
Oracle Service Industries     Reston, VA   USA

Opinions are mine and do not necessarily reflect those of Oracle Corporation
Received on Thu Nov 18 1999 - 14:34:28 CET

Original text of this message