- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: insert into column of table type which is a ob...
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-24-2008 08:57 PM
тАО05-24-2008 08:57 PM
insert into column of table type which is a object of table type(nested table)
I have a requirment where I have to select prod list and insert into a column. I have created a table type which contains a column which is again a table type.( baiscally nested table)
somthing shown below ,
CREATE TYPE CourseList AS TABLE OF VARCHAR2(10) -- define type
/
CREATE TYPE Student AS OBJECT ( -- create object
name VARCHAR2(25),
courses CourseList);
Can anybody please help me how to insert values into the courses using a select statment. Because values for the courses is in a differnt table and I have to insert it into this table type.
I am writing a store proc ..
PLease this is a urgent requirment.
Thanks in advance.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-25-2008 08:58 PM
тАО05-25-2008 08:58 PM
Re: insert into column of table type which is a object of table type(nested table)
Additional info required:
can you please post the DDL of the courses table?
revert.
kind regards
yogeeraj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-25-2008 09:27 PM
тАО05-25-2008 09:27 PM
Re: insert into column of table type which is a object of table type(nested table)
Please find the DDL statment for courses,
create type courses is table of CourseList;
I hope this helps.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-26-2008 09:16 AM
тАО05-26-2008 09:16 AM
Re: insert into column of table type which is a object of table type(nested table)
You have created 3 user-defined types: courselist, student and courses.
I cannot see any table that would be used to store the records.
You will need to review your schema objects.
For example, after creating the table, you can issue the following command to insert a row in it.
INSERT INTO Registration_Tab
values (
1,
Student_obj('Yogeeraj D','DY19800927'),
Address_obj('777, A Street, Esperance'),
Courses_obj('AS009','MU920','DB992','SM010')
);
hope this helps!
kind regards
yogeeraj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-26-2008 02:59 PM
тАО05-26-2008 02:59 PM
Re: insert into column of table type which is a object of table type(nested table)
I will make the changes , but I wanted to insert the data into the object in a plsql block using a select statment.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-26-2008 11:51 PM
тАО05-26-2008 11:51 PM
Re: insert into column of table type which is a object of table type(nested table)
in that case, it will be simply:
e.g.
yogi@mydb.mu>declare
2 me student;
3 begin
4 me := student('Yogeeraj',courselist('SA001','DB090','IS200'));
5 end;
6 /
PL/SQL procedure successfully completed.
Elapsed: 00:00:00.06
yogi@mydb.mu>
hope this helps!
kind regards
yogeeraj