Oracle Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsDatabasesOracle Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old September 29th, 2003, 06:13 PM
tanuja tanuja is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Posts: 1 tanuja User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
more than 1 nested table

I am facing a problem with nested tables.I am trying to create a table with two nested tables in it.

Eg.
create type book_type as object(bookname varchar2(20), bookid varcar2(20));/
create type book_type_tab as table of book_type;/

create type pen_type as object(pen_name varchar2(22), pen_color varchar2(20));/
create type pen_type_tab as table of pen_type;/

Then i craete a table with these two types as columns.

create table college(ssnid number, books book_type_tab, pens pen_type_tab)
nested table books store as books_nt, nested table pens store as pens_nt
((primary key(bookid, nested_table_id));


When i do this it gives me a error saying that it is not able to create the storage table for pens.

Is it not allowed to use two nested tables in a table.Plaese let me know if there is any problem with my creation of tables.

Thanks for any help.

Tanuja.

Reply With Quote
  #2  
Old December 30th, 2003, 01:39 AM
Kallol_das Kallol_das is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2003
Location: New Delhi
Posts: 3 Kallol_das User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Please look into the underlined portion of your code :

create type book_type as object(bookname varchar2(20), bookid varcar2(20));/
---------------
It shouold be varchar2(20) and not varcar2(20)

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesOracle Development > more than 1 nested table


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway
Stay green...Green IT