Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Inserting binary data to an column
Micha wrote:
> > "DA Morgan" <damorgan_at_psoug.org> schrieb im Newsbeitrag > news:1194470031.8469_at_bubbleator.drizzle.com... >> Micha wrote:>>>> Puget Sound Oracle Users Group
>>>> 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)
>> >> Let me see if I get this correctly. You want to use the anydata >> data type to store a user defined data type? Why? >> >> Take what you want to store, binary, hex, octal, who cares and >> create a UDT like this: >> >> TYPE my_udt >> what_i_am_storing BLOB >> what_i_want_it_to_be VARCHAR2 >> >> And then just reconstitute it whenever you want where-ever you want. >> -- >> 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 > > But then must be the column you want to store the my_udt of typ my_udt. > I havnt choose it so, but it ist so. there is an anydata typed clolumn > and the types therein can be different from dataset to dataset. Dont > matter if its normal varchar, number or even user defined types. > I must find a easily way to export and import the data as i have told. > > Micha
The UDT I described can be used to create a column. Don't over-complicate a simple task.
create type my_udt AS OBJECT (
data_store BLOB,
data_type VARCHAR2(20));
/
SQL> create table t (
2 testcol my_udt);
Table created.
SQL> desc t
Name Null? Type
------- -------- ------
TESTCOL MY_UDT
SQL>
-- Daniel A. Morgan University of Washington damorgan_at_x.washington.edu (replace x with u to respond) Puget Sound Oracle Users Group www.psoug.orgReceived on Thu Nov 08 2007 - 12:03:16 CST
![]() |
![]() |