I want to insert a row into my table, but I am getting an error. Where am I going wrong?
CREATE TABLE person (
name VARCHAR(40),
birthday DATE,
PRIMARY KEY (name)
);
Now in python I try to insert a person with the following statement...
curs = connection.cursor
name = input("Name: ")
birthday = input("Birthdate(yyyy-mm-dd): ")
insert = """insert into people(name, birthday) values (:name,:birthday)"""
curs.execute(insert,{'name':name,'to_date(birthday, "yyyy-mm-dd")':birthday})
I get the following error:
curs.execute(insert,{'name':name,'to_date(birthday, "yyyy-mm-dd")':birthday})
cx_Oracle.DatabaseError: ORA-01036: illegal variable name/number