on 09-28-2010 11:23 AM
Hi All,
My scenario is Proxy to JDBC (Asynchronous). I have the requirement to delete the old records i.e. to delete the records of the particular fields that are mapped and then insert the new values from the sender side to the same fields.
My structure at the receiver side has already two statements and I have to implement the above functionality to both the statements.
can anyone suggest me how to implement for the same.
Thanks in Advance,
Lavanya .B
Hi Lavanya,
Two of your SQL statements would execute seperately on two different tables.
regarding update_insert, it will change a value if it finds records that meets the key or else it will insert those values into that column. please check
http://help.sap.com/saphelp_nwpi711/helpdata/en/44/7b6d32fde93673e10000000a114a6b/frameset.htm
also you can make test to see how exactly it behaves, as your exact SQL query behavior may vary slightly from DB to DB based on its config.
regards,
francis
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Lavanya,
I think this you can achieve this by UPDATE_INSERT. I mean rather deleting the rows you can directly update the rows based on the (KEY) condition.
Also you can think about the LOOK UP functionality.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi All,
Thanks for your reply.
1.Can we achieve this without using key?
2.Example: If I have 100 records for a field, which has unbounded occurences and while updating if I get values only for 50 records then what will be the postion of the remaining 50 records?
Can anyone explain in detail.
Lavanya.B
Hi,
I will take an example.
Suppose you have the key field as 'Name'.
At runtime, suppose Name has 2 valuess, A & B and 100 records 50 for A and 50 for B.
Now at the target side, suppose records for A already existing, then these 50 records will UPDATE them in case if any of the field value is different from the already existing ones in database.
And the 50 records pertaining to value B are not there in database at all, so they will be INSERTED.
I hope it is clear now.
Hi All,
Let me state an example say,I have two fields with two different tables and for this 2 statements were used.
TABLE1:
Statement1----
0-U
NAME----
0-1
TABLE2:
Statement2----
0-U
ADDRESS----
0-1
Both Name and Address have values of 10 records .Again 8 records are updated to the Field NAME and no updation for the field Address.
Can anyone tell me what will be the status and how many records will both the fields will have now? while using UPDATE_INSERT action.
Lavanya.B
Hi ,
the functionality that u are lokking for is if the reocrds are already existing in thetable then UPDATE them and if they are not existing INSERT them....right????
if yes,,,u can use value UPDATE_INSERT in the action field ..
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 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.