Hi

I've Oracle 8i and I'm trying to create following primary key on table DB_SIZE.

Structure of table DBSIZE.
Name Null? Type
--------------------- -------- ------------
INSTANCE_NAME NOT NULL VARCHAR2(8)
DB_DATE NOT NULL DATE
DATABASE_SIZE NOT NULL NUMBER(12,2)
DB_ACTUALSIZE NOT NULL NUMBER(12,2)

Primary Key:

ALTER TABLE DB_SIZE
ADD CONSTRAINT PR_INST_DBDATE
PRIMARY KEY (INSTANCE_NAME,TO_CHAR(DB_DATE,'YYYYMMDD'))
/

PRIMARY KEY (INSTANCE_NAME,TO_CHAR(DB_DATE,'YYYYMMDD'))
*
ERROR at line 3:
ORA-00907: missing right parenthesis

First I can create primary using this type of expression..?
If Yes what's wrong with SQL.

Thanks,
Pinakin