I have a table with extremely small numbers which are written in scientific notation. In the sql table, they are actually varchar(50), and I need to convert them to numbers, then round them to a precision of 2.
For example, I get this error when the following statement is run:
select cast(a1 as numeric(19,2)) from alphas
.. when it reaches a value that has an 'E' in it, like: 6.81651e-005
How do I convert the scientific notation into strings that the cast command will understand?