cleaverX
asked on
mysql: convert 2 bytes from blob to integer
Hi,
I have a BLOB field and i want to take 2 bytes from it and use them as an integer. How can i do this?
EG:
select substr(blobfield,195,2) as value1 from mytable;
the 2 bytes on position 195 and 196 are an integer that was stored inside a blob field.
How can i get the integer back in mysql, so i can perform a where / having on this value ?
I have a BLOB field and i want to take 2 bytes from it and use them as an integer. How can i do this?
EG:
select substr(blobfield,195,2) as value1 from mytable;
the 2 bytes on position 195 and 196 are an integer that was stored inside a blob field.
How can i get the integer back in mysql, so i can perform a where / having on this value ?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Strange that there is no working cast for this... (not that I know) ?
Thanks for the solution leannonn !