Table Partition [message #237684] |
Tue, 15 May 2007 08:15 |
lamnguyen14
Messages: 119 Registered: March 2007 Location: Virginia
|
Senior Member |
|
|
Good Morning.
I try to create a partition table by using dynamic SQL. But it did not work. Please help. I would appreciate that
Here is my code:
DECLARE
cid integer := DBMS_SQL.OPEN_CURSOR;
BEGIN
loop
Begin
DBMS_SQL.PARSE(cid,'Create table testing (deptno varchar2(4),
lname varchar2(20),
fname varchar2(20),
ssn varchar2(9),
hire_date varchar2(4),
salary varchar2(6)
Partition by list (deptno)
(
Partition dept_10 values ('10'),
Partition dept_20 values ('20'))'), dbms_sql.v7);
DBMS_SQL.CLOSE_CURSOR(cid);
dbms_output.put_line('TABLE CREATED');
goto endhere;
End;
End loop;
<<endhere>>
null;
END;
Thank you very much.
|
|
|
|
Re: Table Partition [message #237698 is a reply to message #237684] |
Tue, 15 May 2007 08:40 |
lamnguyen14
Messages: 119 Registered: March 2007 Location: Virginia
|
Senior Member |
|
|
Thank you for your reply.
I have Oracle 10g. And I don't know what you meant: "If you have ' inside a string then double it"
Please tell me more details because I'm so new in Oracle. Thanks much for your help.
|
|
|
|
Re: Table Partition [message #237739 is a reply to message #237684] |
Tue, 15 May 2007 09:58 |
lamnguyen14
Messages: 119 Registered: March 2007 Location: Virginia
|
Senior Member |
|
|
Thank you very much. I'm almost there. I got everything ok accept the of missing right parenthesis. I'l figure it out.
I have one more question. Do I need to modify SQL statements in order to access partitioned tables?
Thanks
|
|
|
|
|