I have a HSQLDB table in which the MAC address is stored as a varchar, which is not quite efficient. I’d like to convert it to BIGINT, but I found no conversion function from VARCHAR hex to BIGINT/INTEGER. I tried to use convert like this: convert(client_mac, BIGINT), but it fails with the first non digit encountered. Does anybody have any idea?
Thanks,
I’ve found myself a solution:
This is kind of an workaround, because the first way that comes into my mind to do it was the following:
But this throws this error:
It seems that the problem is with the second parameter.
However, the first one works fine.