on 07-17-2018 5:53 AM
Hello Gurus,
I have a requirement where the key fields are not mandatory (the key fields may be null) . I need UPDATE_INSERT functionality for my requirement. Lets say the record already exists with Key values (eg : A = null , B= null , C=123),when i try to do UPDATE based on the same key values , records are getting inserted rather that getting updated.
i have tried using SQL_DML in action.
I have maintained access command for UPDATE as below.
UPDATE TEST_TABLE SET TEST1 = '$TEST1$' ,TEST2 = '$TEST2$',TEST3 = '$TEST3$',A = '$A$',B = '$B$', C = '$C$'
WHERE NVL(A, 'NULL') = '$A$' AND NVL(B, 'NULL') = '$B$' AND NVL(C, 'NULL') = '$C$' Key values : (eg : A = NULL , B= NULL , C=123),The records are updating correctly. At the same time i need to INSERT the values when new records are triggered. My questions are 1) How can update the records when key values are not mandatory (i.e. null values)2) Can i use both INSERT and UPDATE in the same access statement using action SQL_DML based on the below thread. I have tried using both in one command saperated by ; by the messages are failing due to ORA-00911: invalid character issue. https://archive.sap.com/discussions/thread/3160968Any help would be greatly appreciated. Please help me regarding this requirement. Please let me know for additional details.User | Count |
---|---|
82 | |
10 | |
10 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.