on 11-04-2013 9:44 PM
Hi Experts,
I have a simple file to JDBC scenario, where I am trying to update_insert multiple records in a database table.
I have created a message type which looks like :
target_mt
--------Statement
---------------------Table
------------------------------action
------------------------------Table
---------------------access (0:unbounded)
-----------------------------field1
-----------------------------field2
---------------------key (0:unbounded)
----------------------------field1
the source node looks something like this
source_mt
-------------record
-------------------row (0:unbounded)
---------------------------field1
---------------------------field2
I have mapped the row node to the access and key nodes of the target.
the action is UPDATE_INSERT.
However, only one record is being updated at the target side.
can someone please help me?
Best Regards,
Ravikanth Talagana
Hello,
I don't think mapping Record/Row to access node will solve the problem.
So either map "row" to "dbTableName" (first try this) or "statement node" (apparently, after changing the occ to 0..Unbounded)
<root>
<StatementName1>
<dbTableName action=“UPDATE_INSERT”>
<table>realDbTableName</table>
<access>
<col1>val1</col1>
<col2>val2new</col2>
</access>
<key1>
<col2>val2old</col2>
<col4>val4</col4>
</key1>
<key2>
<col2>val2old2</col2>
</key2>
</dbTableName>
</StatementName1>
Thanks
Amit Srivastava
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ravi
I think the probelm is with the occurrnece of Record in your source side. If Record occurs multiple time in source side, then you can map Record with access and this should solve your problem.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You need to keep statement node 1 to many with respect to number of records that is coming from the source (in your case row). This should fix this problem.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.