I am trying to use a substitution variable with a to_date in a insert statement but I keep getting a "missing comma" error. I am not sure if this is written the correct way to accomplish this or if I am just missing something. The statement looks like this.
INSERT INTO EMPLOYEE ( EMP_ID, START_DATE, END_DATE )
VALUES ('&EMP_ID', TO_DATE( '&START_DATE','12 17 2009','MM DD YYYY'), TO_DATE('&END_DATE','12 17 2009','MM DD YYYY');
I have also tried it this way
INSERT INTO EMPLOYEE ( EMP_ID, START_DATE, END_DATE )
VALUES ('&EMP_ID', '&START_DATE', TO_DATE('12 17 2009','MM DD YYYY'), '&END_DATE', TO_DATE('12 17 2009','MM DD YYYY');
Your help is greatly appreciated.