I have a Access Table with following structure:
INO IDATE NAME ADDRESS CITY PHONE CONTACT & Other Fields.....
1430 01-Apr-15
1431 01-Apr-15
1432 01-Apr-15
1435 01-Apr-15
1436 01-Apr-15
1440 01-Apr-15
1441 01-Apr-15
1448 01-Apr-15
1450 01-Apr-15
1455 02-Apr-15
1456 02-Apr-15
1459 02-Apr-15
Field "INO" is set To Data type "NUMBER" Field Size: Double Indexed= Yes
This field is auto increment programmatically, but after deletion of some useless & cancelled records from database. INo. series is not in order. I want to re generate the numbers & fill the gap of deleted numbers. i.e. INO 1435 should be 1433, 1436 to 1434, 1440 to 1435 & so on.
Select Statement i use to filter records from table:
SELECT *
FROM IDETAIL
WHERE TYPE=True AND INO>=1430 ORDER BY INO;
Till 1430 records are in order there is gap after 1430 & dated 01-Apr-15. there are about 18,000 records in table so not easy to manually correct the records. How can i correct this with SQL or any other command.
P.S. : No related table or entry is effected. We just want to maintain the sequence of entries for accounting purpose.
Just like we use "Do While" function. Starting entry INo is correct and known. All the entries got numbered in a loop starting with 1st record INo=1430, next record INO = 1430+1, next 1430+2 until last entry. How to implement same in UPDATE query alongwith "WHERE TYPE=True".