Home » SQL & PL/SQL » SQL & PL/SQL » Copy from Long to Long Raw with PL/SQL
Copy from Long to Long Raw with PL/SQL [message #38698] Tue, 07 May 2002 00:23 Go to next message
Bekim Bajraktari
Messages: 1
Registered: May 2002
Junior Member
Hi,

i need to copy from Long Field to Long Raw.
But I have problems with VARCHAR2() longer then 4000 bytes.

how can i handle this?

Pleas help me.

Bekim
Re: Copy from Long to Long Raw with PL/SQL [message #38702 is a reply to message #38698] Tue, 07 May 2002 02:49 Go to previous messageGo to next message
John R
Messages: 156
Registered: March 2000
Senior Member
We might be able to help if you could tell us what your problem is in more detail.

Why do you have to copy the Long into a varchar2?
Re: Copy from Long to Long Raw with PL/SQL [message #38711 is a reply to message #38702] Tue, 07 May 2002 23:58 Go to previous messageGo to next message
Bekim B.
Messages: 2
Registered: May 2002
Junior Member
Dear John,

thanks for your attendance and you help (-:

I have a question:
How you get sure in you example (assumed tha you have in long field data.length > 4000 bytes ) that you copy data from Long fiel which are greater then 4000 bytes?

You know about PL/SQL restriction?
Can't bind Varchar2 variables which handle over 4000 Bytes.

The Table HLITEXTE has one field type LONG.
I try to copy from LONG to LONG RAW at other table (Oracle 7.3).

To dont forget, I have binary Bytes in this long field.
That's why I have to treat this like binary data.
When I attempt to insert in to Long Raw than I must use RAWTOHEX(), otherwise occurs error.

I'm so far:

(1) I can read pisewise (4000 Bytes) from long field
(2) I know how mutch bytes are left (i.e. 6500 - 4000 = 1500 Bytes Rest)


Do you know how can I put this pisies togther in table again?

Thanks and best regardes,
Bekim
Re: Copy from Long to Long Raw with PL/SQL [message #38714 is a reply to message #38702] Wed, 08 May 2002 04:29 Go to previous messageGo to next message
Rizzi Davide
Messages: 2
Registered: May 2002
Junior Member
test
Re: Copy from Long to Long Raw with PL/SQL [message #38774 is a reply to message #38702] Tue, 14 May 2002 02:03 Go to previous messageGo to next message
Bekim B.
Messages: 2
Registered: May 2002
Junior Member
Hi John,

thanks for your help.
I have found a soulution now.

If long field longer then 2000 bytes, than I split this in more pieces and copy this pieces in to table like a new dataset (record) and in the same time I write to this table a number of pices, so that when I access this record, I have automatically this pices in the correct order.
In this way I put this pieces togther in JAVA.

Great,
Bekim
Re: Copy from Long to Long Raw with PL/SQL [message #39522 is a reply to message #38702] Mon, 22 July 2002 06:53 Go to previous message
Anis
Messages: 9
Registered: July 2002
Junior Member
We want to purge an older set of long-raw records. Before purging such records, we would like to copy them to archive tables with similar structure. Hence need help to be able to copy data from long-raw to long-raw columns.

Any help will be appreciated.

Thanks. Anis
Previous Topic: Output packed desimal
Next Topic: Performance
Goto Forum:
  


Current Time: Thu Apr 25 12:02:33 CDT 2024