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

Home -> Community -> Usenet -> c.d.o.misc -> Re: Inserting binary data to an column

Re: Inserting binary data to an column

From: Micha <pen_at_gmx.li>
Date: Wed, 7 Nov 2007 11:14:28 +0100
Message-ID: <5pdhg9Fqvdp6U1@mid.dfncis.de>


>
> http://www.psoug.org/reference/convert_func.html#chtr
> http://www.psoug.org/reference/dbms_xdbutil_int.html#xinh
> http://www.psoug.org/reference/convert_func.html#crth
> http://www.psoug.org/reference/utl_raw.html#urctr
> http://www.psoug.org/reference/builtin_functions.html
> http://www.psoug.org/reference/dbms_reputil.html#rurv
> --
> Daniel A. Morgan
> University of Washington
> damorgan_at_x.washington.edu (replace x with u to respond)
> Puget Sound Oracle Users Group
> www.psoug.org

Thnx o lot, this will help a little bit. But im not able to bring this in an correct way^^. Lets make an example:
1.in a table (table_a) exists a column (col_a) of type anydata 2.the data in anydata is an object (lets make a simple object (obj_a) with 2 itmes 1st_name (of varchar2) and 2nd (phonenumber (of number)) 3. in the destination db is obj_a already defined

if i understand it right, i can get the raw presentation of col_a (with the obj_a) with utl_raw.cast_to_raw.

Now i want to create an INSERT statement that should the following: 1. insert the raw data in col_b from table_b (will have the same definition as table_a and col_a, but will be in another db) 2. the data in col_b should not be the raw data. it must represent the original obj_a as in table_a.

So there must be a "recast"? or anything that the destination db recognize the raw data as the obj_a.

My problem is, that i will realize this independent from the types in the anydata field.
Surely, i can step through the anydata field and findout the type and type the cast and recast (eg utl_raw.cast_to_varchar2 and utl_raw.cast_to_raw.

But i will find a way to transmitt an binary representation of the data, that will later (in the destination db) recognize as the original data.

How can i do this?

Thnx for ur help

Micha Received on Wed Nov 07 2007 - 04:14:28 CST

Original text of this message

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