Hi,
I am sending a request with sender, multiple numbers and ID say Sender is same for each request
sender, number, ID
A, 9999, 1
A, 8888, 2
A, 7777, 3
For this request when I get a
msgID
against each number. The response contains only the
msgID
and the ID I have send in the request say
msgID, ID
ABC, 1 (for 1st number)
DEF, 2 (for 2nd number)
GHI, 3 (for 3rd number)
Now I have a table in SQL as below
Number
msgID
ID
I would like to store the number and the corresponding
msgID
in this table. How can this be achieved with best possible way?
My problem is in case a issue occur say at that particular time
msgID
is not generated or the update was not successful and another request is fired with the same sender ID and numbers so the corresponding data should get updated not all the data.
Say
I am sending the below request
sender, number, ID
A, 9999, 1
A, 8888, 2
A, 7777, 3
and the update fails but the
msgID
is generated and user sent another request say
sender, number, ID
A, 9999, 1
A, 8888, 2
A, 6666, 3
and in this case
msgID
is generated, then how will it update only this record not the previous one that was sent earlier.
Which is the best possible way to achieve this?