stephenwales
MIS
I have a database that has a text field that holds (for the most part) a numeric value.
I need to make this number be 10% of it's size.
The basic SQL is easy:
update table
set val = val/10
where tag like 'StatusField%'
But, since val is of datatype text, the statement is going to fail.
I's sure that there's some form of datatype conversion function that could be used, but I'm not that MySQL literate.
Is there a TextToInt function or something that can be used to convert this text field to an integer for mathematical purposes?
Thanks
Steve
I need to make this number be 10% of it's size.
The basic SQL is easy:
update table
set val = val/10
where tag like 'StatusField%'
But, since val is of datatype text, the statement is going to fail.
I's sure that there's some form of datatype conversion function that could be used, but I'm not that MySQL literate.
Is there a TextToInt function or something that can be used to convert this text field to an integer for mathematical purposes?
Thanks
Steve