I have recently issued nearly 2000 ID mifare cards to all the new students who recently started at the college at which I work. Accidentally, the software that printed the cards reversed the LSB of the UID of each card which means I have a useless database of codes. I have tried to write some SQL to run against the mifare codes but my biggest obstacle is the conversion to the correct data types. Here is an actual example of the conversion I would be very grateful to receive.
Using only SQL, I need to convert 437910961 to 2986154266. To do this first convert 437910961 to Hex, which is 1A19FDB1. Then reverse this to B1FD191A. Converting this back to decimal gives the desired answer of 2986154266. However, both the initial number and the result are stored a varchar as apposed to bigint.
If you fancy the challenge then good luck, as this is driving me bonkers!
Thanks ā Desperate!