jspc
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:
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.
I am using the following script to insert data into a table in Oracle and I'm getting this error:
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
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.
ASKER
No problem.
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:
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
I cant see where I am missing a comma.
Getting this error:
ASKER
All good it was a ) missing
ASKER
Thanks.
Why do I need to add the extra section you added?