convert varchar to bigint
-
how can I convert a varchar like this "254565825145" to bigint in mysql stored procedure?
-
how can I convert a varchar like this "254565825145" to bigint in mysql stored procedure?
Try:
select cast('254565825145' as unsigned)
I have CDO, it's OCD with the letters in the right order; just as they ruddy well should be
Forgive your enemies - it messes with their heads
-
Try:
select cast('254565825145' as unsigned)
I have CDO, it's OCD with the letters in the right order; just as they ruddy well should be
Forgive your enemies - it messes with their heads
What if it's in hex? :-D At a previous job of mine, the company stored 64-bit IDs in strings as hex (in RDB*) and there was no native way of converting them back and forth within the database, you had to fetch the data out and then work on it (in C). Eventually I wrote functions (like CLR extended stored procedures in SQL server) to do it. * Which still doesn't support 64-bit integers?