Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Create Table error driving me mad!

Status
Not open for further replies.

memarkiam

IS-IT--Management
Jan 3, 2002
27
GB
Can anyone tell me what is wrong here:

Connected to:
Oracle8i Enterprise Edition Release 8.1.7.2.1 - Produ
JServer Release 8.1.7.2.1 - Production

SQL> CREATE TABLE ml_tst_tmp (
2 ACC_ID NUMBER(16) NOT NULL,
3 CUST_ID NUMBER(16),
4 CUSTOMER_NAME VARCHAR(30),
5 TITLE VARCHAR(10),
6 INITIALS VARCHAR(4),
7 SURNAME VARCHAR(30),
8 ADDR_1 VARCHAR(30),
9 ADDR_2 VARCHAR(30),
10 ADDR_3 VARCHAR(30),
11 POSTCODE VARCHAR (8),
12 HOME_PHONE VARCHAR(11),
13 WORK_PHONE VARCHAR(11),
14 POSTAL_AREA VARCHAR(2),
15 POSTAL_DISTRICT VARCHAR(4),
16 POSTAL_SECTOR VARCHAR(6),
17 ADDR_CHANGED_DAY NUMBER(2),
18 ADDR_CHANGED_MONTH NUMBER(2),
19 ADDR_CHANGED_YEAR NUMBER(4),
20 GENDER VARCHAR(1),
21 BIRTH_DAY NUMBER(2),
22 BIRTH_MONTH NUMBER(2),
23 BIRTH_YEAR NUMBER(4),
24 ACC_OPEN_DAY NUMBER(2),
25 ACC_OPEN_MONTH NUMBER(2),
26 ACC_OPEN_YEAR NUMBER(4),
27 STORE_ACC_OPENED VARCHAR(9),
28 PREFERRED_TRADING_SITE NUMBER(9),
29 INITIAL_DAY NUMBER(2),
30 INITIAL_MONTH NUMBER(2),
31 INITIAL_YEAR NUMBER(4),
32 INITIAL_PURCHASE_VALUE NUMBER(8),
33 STATEMENT_DAY NUMBER(2),
34 STATEMENT_MONTH NUMBER(2),
35 STATEMENT_YEAR NUMBER(4),
36 CARD_STYLE VARCHAR(2),
37 ADDITIONAL_CARDHOLDERS NUMBER(2),
38 CREDIT_LIMIT_INCREASES NUMBER(3),
39 RECOMMENDED_CREDIT_LIMIT NUMBER(10),
40 PROMOTABILITY_CODE VARCHAR(1),
41 APPLICATION_DAY NUMBER(2),
42 APPLICATION_MONTH NUMBER(2),
43 APPLICATION_YEAR NUMBER(4)
44 MARITAL_STATUS VARCHAR(1),
45 DEPENDENTS NUMBER(2),
46 STORECARD VARCHAR(1),
47 CATALOGUE VARCHAR(1),
48 INTERNET VARCHAR(1)
49 );
CREATE TABLE ml_tst_tmp (
*
ERROR at line 1:
ORA-00922: missing or invalid option

Many, many thanks to anyone who can help!!

Cheers,
Mark,
London
 
try changing colum name title to something like titles. it works on my machine
 
Hi Mark,

What privileges do you have for the user by which you are trying to create this role?
 
You are missing a comma after APPLICATION_YEAR NUMBER(4)

Alex

 
Hi,
Your are missing a comma after APLICATION_YEAR NUMBER(4)though I don't know whether it is a typing mistake or not.Apparently there is no mistake in the line no.1. But you can try by changing the table name without using any reserve word.My suggestion is, you may use VARCHAR2 instead of VARCHAR .
Best wishes.
 
just a thought.. why have you not used date as datatype, and u have used three number fields for day/month/year?!

 
Comma is right, but i recommend to create table partly,
to add 5 rows. Column names like TITLE or INITIALS
are suspect.
 
It's nothing to do with technical side , It's because of careless - typing mistake

APPLICATION_DAY NUMBER(2),
APPLICATION_MONTH NUMBER(2),
APPLICATION_YEAR NUMBER(4)
MARITAL_STATUS VARCHAR(1),
Commas missing after column application_year Best regards
LiGang
U get , U given ..
 
Thank you all so much for the help! Sorry to bother you with something as silly as a typo - I just couldn't see it!, and the error message threw me off.

It's working now.

Thank you!!
Mark
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top