On occasions I have the need to copy an entire record from a data table. Since the accession number is unique and cannot be repeated, it is necessary to change the accession number before creating the new, copied, record.
If the accession number has no decimal point or the decimal point goes no higher than .2, there is no problem. If, however, the decimal point is higher than .2 the results can be incorrect.
I.e copying 10886 will return 10887. 10886.1 will return 10886.2 and 10886.2 will return 10886.3 consistently and 10886.5 will return 10886.6.
in my example db 10886.1 returns 10886.2, 10886.3 and 10886.6 depending on the table and method used. 10886.6 is the correct result since 10886.5 already exists.
In the sample db attached, the file tTemp is a cut down copy of my main data table. The table tTemp2 is a copy of the five highest numbers in tTemp so the data in both tables has been copied and pasted from the original table for a degree of consistency.
My question basically is why the different results and how do I ensure consistency in the results regardless of the data presented?
My descriptions sometimes leave a bit to be desired so I will let the code do the talking.
If the accession number has no decimal point or the decimal point goes no higher than .2, there is no problem. If, however, the decimal point is higher than .2 the results can be incorrect.
I.e copying 10886 will return 10887. 10886.1 will return 10886.2 and 10886.2 will return 10886.3 consistently and 10886.5 will return 10886.6.
in my example db 10886.1 returns 10886.2, 10886.3 and 10886.6 depending on the table and method used. 10886.6 is the correct result since 10886.5 already exists.
In the sample db attached, the file tTemp is a cut down copy of my main data table. The table tTemp2 is a copy of the five highest numbers in tTemp so the data in both tables has been copied and pasted from the original table for a degree of consistency.
My question basically is why the different results and how do I ensure consistency in the results regardless of the data presented?
My descriptions sometimes leave a bit to be desired so I will let the code do the talking.