If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > DB2 to Oracle Migrations (Object Type)

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 09-01-11, 09:56
jumshoos jumshoos is offline
Registered User
 
Join Date: Sep 2011
Posts: 17
DB2 to Oracle Migrations (Object Type)

Hi,

Can anyone please help me to convert object types from Oracle into DB2 .

for example :

CREATE TYPE address_type AS OBJECT
(ADDR_LINE VARCHAR2(50),
CITY VARCHAR2(50),
STATE VARCHAR2(02),
ZIP VARCHAR2(05));
/
CREATE TYPE address_table_type AS TABLE OF address_type;
/

CREATE TABLE employee (
Name VARCHAR2(20),
addresses ADDRESS_TABLE_TYPE)
NESTED TABLE addresses STORE AS addresses_table;
Reply With Quote
  #2 (permalink)  
Old 09-01-11, 10:00
n_i n_i is offline
:-)
 
Join Date: Jun 2003
Location: Toronto, Canada
Posts: 4,449
Code:
CREATE TYPE address_type is RECORD
       (ADDR_LINE        VARCHAR2(50),
        CITY             VARCHAR2(50),
        STATE            VARCHAR2(02),
        ZIP              VARCHAR2(05));
/
CREATE TYPE address_table_type AS TABLE OF address_type
index by binary_integer;
/
Nested tables are not supported.
Reply With Quote
  #3 (permalink)  
Old 09-01-11, 10:04
jumshoos jumshoos is offline
Registered User
 
Join Date: Sep 2011
Posts: 17
Many thanks
Reply With Quote
  #4 (permalink)  
Old 09-01-11, 10:06
jumshoos jumshoos is offline
Registered User
 
Join Date: Sep 2011
Posts: 17
ni ,

do you mind if i give more code to convert, i am looking for a template.
Reply With Quote
  #5 (permalink)  
Old 09-01-11, 11:40
n_i n_i is offline
:-)
 
Join Date: Jun 2003
Location: Toronto, Canada
Posts: 4,449
Reply With Quote
Reply

Tags
db2 conversion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On