Insert / Update

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
slaparna
Participant
Posts: 1
Joined: Tue Apr 04, 2006 6:11 am

Insert / Update

Post by slaparna »

Hi,

I have a table on which I'm performing "Insert New rows or Update else". There is one column "Created Date" which needs to get populated when it is a new row. How can I stop updating that column when it is an existing row.

I tried of using the user defined sql by placing the "SYSDATE" in the insert SQL, but I am getting the warning "ORA-00911: invalid character"

Is there anyway I can use without using the hash file.
Any help would be appreciated.

Thanks,
Lakshmi
y_suresh
Participant
Posts: 12
Joined: Wed Oct 06, 2004 1:16 pm

Re: Insert / Update

Post by y_suresh »

try using 'DSJobStartDate' DSMacro in your transformer , not in SQL and use 2 seperate paths for Update and Insert logic.
kris
Participant
Posts: 160
Joined: Tue Dec 09, 2003 2:45 pm
Location: virginia, usa

Re: Insert / Update

Post by kris »


I tried of using the user defined sql by placing the "SYSDATE" in the insert SQL, but I am getting the warning "ORA-00911: invalid character"

Is there anyway I can use without using the hash file.
Any help would be appreciated.
You were doing the right thing in that case, But are you taking care of converting the sysdate to your out column datatype?

to_char(sysdate, format you want) or to_date(sysdate, format you want).

Kris~
~Kris
Post Reply