Code: Select all
UPDATE ANSATT /* PDB - AnsattFraStage */ SET BANKKODE=:2,LOGON_ID=:3,ANSATT_FOM=TO_DATE(:4, 'YYYY-MM-DD HH24:MI:SS'),ANSATT_TOM=TO_DATE(:5, 'YYYY-MM-DD HH24:MI:SS'),FORNAVN=:6,ETTERNAVN=:7,INITIALER=:8,ANSATTROLLE=:9 WHERE ANSATT_ID=:1;
INSERT INTO ANSATT /* PDB - AnsattFraStage */ (ANSATT_ID,BANKKODE,LOGON_ID,ANSATT_FOM,ANSATT_TOM,FORNAVN,ETTERNAVN,INITIALER,ANSATTROLLE) VALUES (:1,:2,:3,TO_DATE(:4, 'YYYY-MM-DD HH24:MI:SS'),TO_DATE(:5, 'YYYY-MM-DD HH24:MI:SS'),:6,:7,:8,:9)
Code: Select all
ORA-01036: illegal variable name/number
I tried searching the forum for related issues and found a lot of posts, none which actually gave me an answer to my problem.
Anyone have any ideas on this? Could it be that the date format contains : and the MM and SS parts therefore are interpreted as variables? I have nine columns and use nine numbered variables so I can't se where the problem is.
Any help is apreciated.
m.