create table orders(
ord_id numeric(5) primary key,
purch_Atm float(8),
ord_date date,
Customer_id Numeric(5),
foreign key (customer_id) references customer1 (customer_id),
Salesman_id Numeric(5),
foreign key (Salesman_id) references salesman(Salesman_id))
insert into orders values (70001,150.5,'2012-10-05',3005,5002);
insert into orders values (70009,270.65,'2012-09-10',3001,5005);
insert into orders values (70002,65.26,'2012-10-05',3002,5001);
insert into orders values (70004,110.5,'2012-08-17',3009,5003);
insert into orders values (70007,948.5,'2012-09-10',3005,5002);
insert into orders values (70005,2400.6,'2012-07-27',3007,5001);
insert into orders values (70008,5760,'2012-09-10',3002,5001);
insert into orders values (70010,1983.2,'2012-10-10',3004,5006);
insert into orders values (70003,2480.4,'2012-10-10',3009,5003);
insert into orders values (70012,250.45,'2012-06-27',3008,5002);
insert into orders values (70011,75.29,'2012-08-17',3003,5007);
insert into orders values (70013,3045.6,'2012-04-25',3002,5001);
Table is inserted correctly as far as I can tell. I used the same insert format for my other tables but it will not work for this one. I am not sure why so please help.
This is what it gives me for errors: Error report - SQL Error: ORA-01861: literal does not match format string 01861. 00000 - "literal does not match format string" *Cause: Literals in the input must be the same length as literals in the format string (with the exception of leading whitespace). If the "FX" modifier has been toggled on, the literal must match exactly, with no extra whitespace. *Action: Correct the format string to match the literal.
to_date('2012-10-05'', 'yyyy-mm-dd')
. Or set a default date format of your session:ALTER SESSION SET NLS_DATE_FORMAT='yyyy-dd-mm'
– krokodilko