I am using OCI stage to insert/update rows in Oracle database. I am using update/insert query. I want to insert all rows but update all but 1 row. So in the OCI stage, I use user defined SQL
INSERT INTO <TABLE> (Col1, Col2, Col3, Col4) VALUES (:1,:2,TO_DATE(:3, 'YYYY-MM-DD HH24:MI:SS'),:4);
UPDATE <TABLE> SET Col1=:2,Col3=TO_DATE(:3, 'YYYY-MM-DD HH24:MI:SS') WHERE Col1=:1
As you can see, I don't want to update Col4 in the UPDATE statement... I thought this would work but DS/Oracle errors out saying illegal variable/number... But if put in Col4 in the update statement, it works fine..
How do I fix this? I don't want to update Col4 ...
Thanks much !!
Oracle query in DS job!!
Moderators: chulett, rschirm, roy
is your col1 marked as a key column on your job? and is it also key on your database? if so, try to seperate inserts and updates into two links and use the same user defined queries but drop col4 for the update link
that should work
that should work
Thanks,
Chad
__________________________________________________________________
"There are three kinds of people in this world; Ones who know how to count and the others who don't know how to count !"
Chad
__________________________________________________________________
"There are three kinds of people in this world; Ones who know how to count and the others who don't know how to count !"