0

I connected to Cassandra database using Java and able to query and read all the values as per my query. What i want to do now is

  1. Write a logic to scan the table and fetch the values of the last row which is SeqNo 3 in this case
  2. Once i fetch these values increase the SeqNo by 1, Amount by $10 and Start Date by 1 month and store it in some variable.
  3. Pass these new stored value in Post Request Payload which will then insert the new values in db with SeqNo 4 Program should continue adding new values to db everytime i run my post method payload.

As i mention i am able to get the values from Cassandra but need to know the logic of incrementing it and storing it. Thanks. enter image description here

Sam1977
  • 15
  • 4
  • Update the question with queries you are using and schema of the table. – Manish Khandelwal Sep 30 '20 at 04:02
  • The query i am using is select * from table where acctno=555; This will give me the all the accounts. Now i need to retrieve all the values from the last row and store it into some variable and increment it. – Sam1977 Sep 30 '20 at 12:06

0 Answers0