Home » SQL & PL/SQL » SQL & PL/SQL » Invalid data type (Oracle 10 g)
Invalid data type [message #351697] Thu, 02 October 2008 09:18 Go to next message
parmarjm
Messages: 25
Registered: October 2006
Junior Member
Hi
I am creating partition on a table.
query

alter table TABLE_NAME
ADD PARTITION BY RANGE (BEGIN_dT)
JAN__1980 VALUES LESS THAN (TO_DATE('01-FEB-1980','DD-MON-YYYY')),
feb__1980 VALUES LESS THAN (TO_DATE('01-MAR-1980','DD-MON-YYYY'));

when I run above query received below error.
ORA-00902: invalid datatype

can some one suggest me where I am doing wrong ?
any help is appreciated.
Thnks
JP
Re: Invalid data type [message #351702 is a reply to message #351697] Thu, 02 October 2008 10:19 Go to previous messageGo to next message
Michel Cadot
Messages: 64120
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Post the create table you made.

Use SQL*Plus and copy and paste your session.

Before please read OraFAQ Forum Guide, especially "How to format your post?" section.
Make sure that lines of code do not exceed 80 characters when you format.
Indent the code (See SQL Formatter) and align the columns in result.
Use the "Preview Message" button to verify.
Also always post your Oracle version (4 decimals).

Regards
Michel
Re: Invalid data type [message #352467 is a reply to message #351697] Tue, 07 October 2008 21:23 Go to previous messageGo to next message
prt1979
Messages: 3
Registered: October 2008
Location: ZhengZhou China
Junior Member
nls is ?
Re: Invalid data type [message #352473 is a reply to message #351697] Tue, 07 October 2008 22:22 Go to previous messageGo to next message
tanmoy1048
Messages: 133
Registered: June 2007
Senior Member
I think, u cant not use a "ADD PARTITION" clause to a non-partitioned table.
Re: Invalid data type [message #352476 is a reply to message #351697] Tue, 07 October 2008 23:48 Go to previous messageGo to next message
rajavu1
Messages: 1574
Registered: May 2005
Location: Bangalore , India
Senior Member

If you are trying to partition an existing table refer ,

Partitioning an Existing Table using DBMS_REDEFINITION

Partitioning an Existing Table using EXCHANGE PARTITION

Thumbs Up
Rajuvan.
Re: Invalid data type [message #352483 is a reply to message #352473] Wed, 08 October 2008 00:54 Go to previous messageGo to next message
Michel Cadot
Messages: 64120
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
tanmoy1048 wrote on Wed, 08 October 2008 05:22
I think, u cant not use a "ADD PARTITION" clause to a non-partitioned table.

Who say that the table was not partitioned?

Regards
Michel

Re: Invalid data type [message #352507 is a reply to message #351697] Wed, 08 October 2008 01:52 Go to previous messageGo to next message
tanmoy1048
Messages: 133
Registered: June 2007
Senior Member
Second line of this thread is telling this. But it could be my problem to understand the problem.
Re: Invalid data type [message #352508 is a reply to message #352507] Wed, 08 October 2008 01:59 Go to previous message
Michel Cadot
Messages: 64120
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Actually OP's statement is fully invalid whether the table is already partitioned or not and if he used SQL*Plus as recommended we would see it at first sight:
SQL> alter table t add partition by range (id) x values less than (10);
alter table t add partition by range (id) x values less than (10)
                            *
ERROR at line 1:
ORA-00902: invalid datatype

Regards
Michel

Previous Topic: Dynamic cursor using ref cursor
Next Topic: ORACLE Project on LOBs
Goto Forum:
  


Current Time: Tue Dec 06 12:30:27 CST 2016

Total time taken to generate the page: 0.05580 seconds