Home » SQL & PL/SQL » SQL & PL/SQL » SQL & PL/sql
SQL & PL/sql [message #386140] Thu, 12 February 2009 18:59 Go to next message
cwilliam912
Messages: 4
Registered: February 2009
Junior Member
I AM HAVING PROBLEM THIS THIS QUESTION PLEASE HELP

SQL> CREATE TABLE EMPLOYEE_RANGE
2 (EMPLOYEE_ID NUMBER (10),
3 JOB_TITLE VARCHAR2(45),
4 first_name varchar2(40),
5 Last_name varchar2(40),
6 phone_number Varchar2(20));

Table created.

SQL> PARTITION BY RANGE (EMPLOYEE_ID)
SP2-0734: unknown command beginning "PARTITION ..." - rest of line ignored.
SQL> ( PARTITION EE_P1 VALUES LESS THAN (25001)
2 TABLESPACE USERS,
3 PARTITION EE_P2 VALUES LESS THAN (50001)
4 TABLESPACE USERS,
5 PARTITION TRANS_P3 VALUES LESS THAN (75001)
6 TABLESPACE USERS,
7 PARTITION EE_P3 VALUES LESS THAN (100001)
8 TABLESPACE USERS);
( PARTITION EE_P1 VALUES LESS THAN (25001)
*
ERROR at line 1:
ORA-00928: missing SELECT keyword
Re: SQL & PL/sql [message #386145 is a reply to message #386140] Thu, 12 February 2009 19:48 Go to previous messageGo to next message
BlackSwan
Messages: 25050
Registered: January 2009
Location: SoCal
Senior Member
You need to help us by following the Posting Guidelines as stated below.
http://www.orafaq.com/forum/t/88153/0/
So we can help you

Re: SQL & PL/sql [message #386148 is a reply to message #386140] Thu, 12 February 2009 20:38 Go to previous messageGo to next message
cwilliam912
Messages: 4
Registered: February 2009
Junior Member
I have read the posting guideline what else you want me to do.
Re: SQL & PL/sql [message #386149 is a reply to message #386140] Thu, 12 February 2009 20:48 Go to previous messageGo to next message
BlackSwan
Messages: 25050
Registered: January 2009
Location: SoCal
Senior Member
Provide all relevant information about your problem, including Oracle software version (4 decimal places) and operating system version.
Format your code and make sure that lines do not exceed 80 characters. Use the "Preview Message" button to check it.


What terminates a SQL statement
Re: SQL & PL/sql [message #386151 is a reply to message #386148] Thu, 12 February 2009 21:42 Go to previous messageGo to next message
cwilliam912
Messages: 4
Registered: February 2009
Junior Member
Recall that you created this table for Globe's Employee:
CREATE TABLE CH07EMPLOYEE_RANGE
(EMPLOYEE_ID NUMBER (10),
JOB_TITLE VARCHAR2(45),
first_name varchar2(40),
Last_name varchar2(40),
phone_number Varchar2(20)) ;
PARTITION BY RANGE (EMPLOYEE_ID)
(PARTITION EE_P1 VALUES LESS THAN (25000),
TABLESPACE USERS,
PARTITION EE_P2 VALUES LESS THAN (50000),
TABLESPACE USERS,
PARTITION EE_P3 VALUES LESS THAN (750000),
TABLESPACE USERS,
PARTITION EE_P4 VALUES LESS THAN (100000));
TABLESPACE USERS);
Started with this Create Table command, and modify it to create a new rang-partitioned table named CH07Employee_Range that contains the same column as the employee. The partition key is the Employee_ID column, and there should four partitions, all in the USERS tables. Assume that the valued in EMPLOYEE_ID start at one, reach 100,000 and are distributed evenly. Oracle 10g 10.2.0 software and WindowXP

These are my problems:
SP2-0734: unknown command beginning "PARTITION ..." - rest of line ignored. and ERROR at line 1:
ORA-00928: missing SELECT keyword

ERROR at line 1:
ORA-00928: missing SELECT keyword



SQL> CREATE TABLE CH07EMPLOYEE_RANGE
2 (EMPLOYEE_ID NUMBER(10),
3 JOB_TITLE VARCHAR2(45),
4 first_name varchar2(40),
5 Last_name varchar2(40),
6 phone_number Varchar2(20));

Table created.

Table created.

SQL> PARTITION BY RANGE (EMPLOYEE_ID)
SP2-0734: unknown command beginning "PARTITION ..." - rest of line ignored.
SQL> (PARTITION EE_P1 VALUES LESS THAN (25001),
2 TABLESPACE USERS,
3 PARTITION EE_P2 VALUES LESS THAN (50002),
4 TABLESPACE USERS,
5 PARTITION EE_P3 VALUES LESS THAN (750004),
6 TABLESPACE USERS,
7 PARTITION EE_P4 VALUES LESS THAN (100004));
(PARTITION EE_P1 VALUES LESS THAN (25001),
*
ERROR at line 1:
ORA-00928: missing SELECT keyword

Re: SQL & PL/sql [message #386175 is a reply to message #386151] Fri, 13 February 2009 00:20 Go to previous messageGo to next message
Frank
Messages: 7880
Registered: March 2000
Senior Member
The create table clause is terminated with a semicolon. After that you continue with the table definition.
Resolution: remove semicolon in the middle of the statement. I don't know if you'll end up with a valid statement after that (didn't test it)
Re: SQL & PL/sql [message #386179 is a reply to message #386151] Fri, 13 February 2009 00:45 Go to previous message
Michel Cadot
Messages: 64152
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
You still didn't follow the posting guidelines nor usr Preview button to check.

Regards
Michel
Previous Topic: create view based on parameters
Next Topic: SQL*PLUS Oracle 10g
Goto Forum:
  


Current Time: Sat Dec 10 02:47:42 CST 2016

Total time taken to generate the page: 0.14401 seconds