Hi I am trying to create a sql script that inserts data from a staging table to the main table and in the staging table I have a column called datetime that is a varchar field.
I am inserting all columns plus converting the datetime field to the field in the main table that has a datatype of time stamp.
Data in im DateTime staging table looks like this.
‘10-JUN-16 12:00 AM’
I tried this below and it didn’t work. I got an error message saying. a non-numeric character was found where numeric was expected. My assumption is the AM is or the JUN is throwing it off.
INSERT INTO meterdatarows
TO_TIMESTAMP (datetime, ‘yyyy/mm/dd hh24:mi:ss’),
FROM meterdatarowsstaging commit;
Thanks for the help.