0

CREATE TABLE temp_stud as select * from STUD_MAST

PARTITION BY RANGE(ADM_DT)

(

PARTITION temp_stud1 VALUES LESS THAN(TO_DATE('02/01/2000','MM/DD/YYYY')),

PARTITION temp_stud2 VALUES LESS THAN(TO_DATE('03/01/2000','MM/DD/YYYY')),

PARTITION temp_stud3 VALUES LESS THAN(TO_DATE('04/01/2000','MM/DD/YYYY')),

PARTITION temp_stud4 VALUES LESS THAN(TO_DATE('05/01/2000','MM/DD/YYYY'))

);

I am getting a missing left parenthesis error for above table creation can anyone tell me what is the issue in above creation

Note: ADM_DT is a date column with data type char(8) and storing format YYMMDD

1 Answer 1

0

Please use below SQL. The Creation of Partition has be part of Create table.

CREATE TABLE temp_stud   
    PARTITION BY RANGE(ADM_DT)

    (

    PARTITION temp_stud1 VALUES LESS THAN(TO_DATE('02/01/2000','MM/DD/YYYY')),

    PARTITION temp_stud2 VALUES LESS THAN(TO_DATE('03/01/2000','MM/DD/YYYY')),

    PARTITION temp_stud3 VALUES LESS THAN(TO_DATE('04/01/2000','MM/DD/YYYY')),

    PARTITION temp_stud4 VALUES LESS THAN(TO_DATE('05/01/2000','MM/DD/YYYY'))

    )
    as select * from STUD_MAST;
Sign up to request clarification or add additional context in comments.

6 Comments

i am getting error code ORA-14036 partition bound value too large for column
ADM_DT data type is char(8) and i cannot change it
@Robert In your question you said "Note: ADM_DT is a date". Maybe you should correct that.
"Note: ADM_DT is a date" - now you say it's a string. Which is is? If it is a string (why!?) what format - if YYYYMMDD then you can partition on a string too, instead of on a date?
hello guys ADM_DT is a date but its data type in char(8)
|

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.