As Ak

As Ak

  • 2k
  • 51
  • 2.4k

Add new data to database by adding 1 to the last data

Oct 7 2020 10:18 PM

I have a list of data in the database. I need to insert new data automatically after the status change to "In use" from "New" in the database by adding 1 to "End Range" to get the next "Start Range". For the end range, it will add the new start range with "FFFF".

For example, the previous start and end range is 10120000, 1012FFFF. so for the next new range that need to be inserted, it will take the 1012FFFF and plus it with 1. so the start range for the next data should be 10130000. While for the end range, it will add the 10130000 with FFFF and the result is 1013FFFF.

The status for the next range that inserted in 'New'.

How can i add the new range with same format with previous data.
example list of data in database 

Answers (1)