Link to home
Start Free TrialLog in
Avatar of jspc
jspcFlag for Australia

asked on

Inserting Data Into Oracle Database

Hello,

I am using the following script to insert data into a table in Oracle and I'm getting this error:

User generated image
My script is:
INSERT INTO Movie (CatalogID, Title, Genre, ReleaseDate, HirePrice) VALUES ('1', 'Sexy in the City', 'Comedy', '2012-12-12', '5.00');

Table script was:
CREATE TABLE Movie
(CatalogID CHAR(5) NOT NULL,
Title VARCHAR(50) NOT NULL,
Genre VARCHAR(50) NOT NULL,
ReleaseDate DATE NOT NULL,
HirePrice NUMERIC(5,2) NOT NULL,
CONSTRAINT CatalogID_pk PRIMARY KEY      (CatalogID));

Can anyone help?

Thanks.
ASKER CERTIFIED SOLUTION
Avatar of Pawan Kumar
Pawan Kumar
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of jspc

ASKER

Yes, that worked!
Thanks.

Why do I need to add the extra section you added?
basically its the format the the column data type is expecting., read more at - https://www.techonthenet.com/oracle/errors/ora01861.php
Please add Oracle database as Topic for future reads.
Avatar of jspc

ASKER

No problem.
Avatar of jspc

ASKER

Are you able to help me with these 2?

Using the INSERT
INSERT INTO MEMBER (MemberID, BranchID, FirstName, LastName, Address, Email, Phone, Password, RegistrationDate) VALUES ('ME1', '1', 'Keith', 'Pedersen', '33 Colman Street Drouin', 'keithp@hotmail.com.au', '95951599', '00000', TO_DATE('2012/12/12','yyyy/mm/dd');

I cant see where I am missing a comma.

Getting this error:
User generated image
Avatar of jspc

ASKER

All good it was a ) missing