I am trying to parse a column of strings in Oracle (version 8i) to an integer.
I am accessing the results through Oracle.DataAccess library
I’m already using TO_NUMBER with a mask to convert the string into a number with no decimal places. The problem is that the value in the client code is being retrieved as a decimal rather than an int.
NUMBER columns always come back as decimals in ODP.NET. To get around this, pull it back as an OracleDecimal, which has several “Toxxxx” methods to cast the value into the native .NET type you need.
(Forgive me if the code above isn’t 100% correct, as I don’t have ODP.NET installed at home.)