Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

update and insert in the same session

Status
Not open for further replies.

monrow

Technical User
Apr 22, 2008
29
FR
HI,

I've a mapping which update a target A(update orverride)
and insert data in another target B.
In my session,i've choose the option : Data driven;
For target A i choose choose : update as update
For target B i choose : insert

When i run the session, line are inserted in target B but noting are update in target A;
I've this error
WRT_8117 : ERROR : target table [A] does not allow insert.
Row # [0] in bad file

Can someone help me ?

Thanks
 
Do you have an update transformation to the update target?

"I think we're all Bozos on this bus!" - Firesign Theatre [jester]
 
i've no update strategy transformation,
i've just my 2 sources and 2 targets.
only in the session, i've precised : Data driven and for each target, if it's only "update as update" or "Insert" in the properties.

If i use an update transformation , it will be run ?
With an update transformation, can i override the update query in the target ?

thanks
 
Yes, you need to use the update transform. Without it, PC thinks it's an insert. The update transform can do updates, inserts and deletes. Set the properties to DD_UPDATE to tell it to do the update.

"I think we're all Bozos on this bus!" - Firesign Theatre [jester]
 
Some experts will advice you to stay away from data-driven. Instead , split the mapping into 1 for updates and 1 for inserts. This way you can use the optimum for inserts (namely block inserts against row-by-row) where speed is not reduced by mixing with row-by-row updates.
The mappings should of course include a lookup that performs a check whether a key exists)

Ties Blom

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top