Home » SQL & PL/SQL » SQL & PL/SQL » Long-to-Varchar2 Migration
Long-to-Varchar2 Migration [message #9579] Fri, 21 November 2003 05:47 Go to next message
ron
Messages: 50
Registered: July 1999
Member
Hi,

I am currently developing an application which uses
Oracle Lite 5.0.2.8.0 on a Oracle9i Server. I need
to replicate some tables which currently contain
LONG-Datatypes which cannot be replicated. I know that
with Oracle's Standard Replication, LONGs should be
migrated to LOBs (in our case CLOB). Problem is, that Oracle Lite does not support replication of CLOBs.
Therefore I've to find a solution where I can migrate
those existing LONG columns into several VARCHAR2 (e.g.) columns and replicate those duplicated columns.
I thought about using triggers. Does anyone have had
a similar problem and provide me with a workaround,
possibly a PL/SQL script for this trigger (if this
would be an acceptable solution?! Any other inputs?

thanks for your support in advance,

regards,

Ron
Re: Long-to-Varchar2 Migration [message #9619 is a reply to message #9579] Mon, 24 November 2003 09:17 Go to previous message
Adrian Billington
Messages: 139
Registered: December 2002
Senior Member
You could use DBMS_SQL.COLUMN_VALUE_LONG to piece-wise fetch your LONG data and then chop up each chunk into VARCHAR2(4000)s.

Just a thought, to add the number of columns to your table to support this requires you to know how many you will need ( i.e. max bytes value for LONG / 4000 ). You might want to consider a nested table of VARCHAR2(4000) elements instead, so you still have one "column".

Regards
Adrian
Previous Topic: Pls Provide me a good query i am great trouble
Next Topic: Querying array element
Goto Forum:
  


Current Time: Fri Apr 19 10:28:43 CDT 2024