Author |
Message
|
5koff |
Posted: Sun Jun 23, 2013 12:38 pm Post subject: Upsert via graphical map |
|
|
Newbie
Joined: 23 Jun 2013 Posts: 8
|
Hi guys,
can you give me an advice how to do an "upsert" of a DB record via graphical map.
As an input of the map i have a list of objects, each having ID, an I have to update the existing DB records and insert the others.
Any help would be appreciated!
Thanks in advance,
Mitko |
|
Back to top |
|
 |
lancelotlinc |
Posted: Mon Jun 24, 2013 3:18 am Post subject: |
|
|
 Jedi Knight
Joined: 22 Mar 2010 Posts: 4941 Location: Bloomington, IL USA
|
|
Back to top |
|
 |
5koff |
Posted: Mon Jun 24, 2013 3:25 am Post subject: |
|
|
Newbie
Joined: 23 Jun 2013 Posts: 8
|
We are using MWB 8 Express. So usinq esql in subflows just does not work .
Although i found an "insert" option amongst the DB update properties in a graphical map. It tries to insert the row if the where clause of the update evaluates to false. I am just about to test does it work properly. |
|
Back to top |
|
 |
lancelotlinc |
Posted: Mon Jun 24, 2013 3:28 am Post subject: |
|
|
 Jedi Knight
Joined: 22 Mar 2010 Posts: 4941 Location: Bloomington, IL USA
|
Sounds like you need a different edition. Free is great; but you need pay-for. Free is for demo; pay-for is for working functionality.
My Filipino friend often says: "Your credit is good with us, but we need cash." _________________ http://leanpub.com/IIB_Tips_and_Tricks
Save $20: Coupon Code: MQSERIES_READER |
|
Back to top |
|
 |
5koff |
Posted: Mon Jun 24, 2013 3:48 am Post subject: |
|
|
Newbie
Joined: 23 Jun 2013 Posts: 8
|
Well, if the best way to do an upsert is collect money for advanced mode, then let it be. |
|
Back to top |
|
 |
mqjeff |
Posted: Mon Jun 24, 2013 8:02 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
The v8 GDM has both an Insert function and an Update function.
You can use a for to loop over each row. You can use an IF to find out if an update works, and then do an insert if it doesn't.
The same as you would do in any other programming language. |
|
Back to top |
|
 |
mgk |
Posted: Mon Jun 24, 2013 8:19 am Post subject: |
|
|
 Padawan
Joined: 31 Jul 2003 Posts: 1642
|
Quote: |
"Sounds like you need a different edition. Free is great; but you need pay-for. Free is for demo; pay-for is for working functionality. " |
This is incorrect. The Express version of WMB is NOT free. It is a paid for edition and is fully supported. The Trial version (now called Developer Edition) is the free version.
Kind regards, _________________ MGK
The postings I make on this site are my own and don't necessarily represent IBM's positions, strategies or opinions. |
|
Back to top |
|
 |
|