I have 2 numbers from two different tables I want to compare.
The datatypes look like this:
table datatype length precision
table1 float 8 53
table2 numeric 9 19
In table 1 the number 53 appears.
In table 2 it shows up as 5300
Ultimately I only want to retrieve records where
table1.field1 <> table2.field2
I tried doing it "as-is" hoping for an implicit conversion but the results show that it thinks 53 and 5300 are not equal.
I tried this:
and here's what I get:
5300.00
I tried this:
and got this:
5300.0
So maybe I am doing the conversions wrong. I am guessing this would be best done in the Where statment even though the code I show is a select.
Any ideas?
Thank you.
The datatypes look like this:
table datatype length precision
table1 float 8 53
table2 numeric 9 19
In table 1 the number 53 appears.
In table 2 it shows up as 5300
Ultimately I only want to retrieve records where
table1.field1 <> table2.field2
I tried doing it "as-is" hoping for an implicit conversion but the results show that it thinks 53 and 5300 are not equal.
I tried this:
Code:
select (str(table2.costvalue, 10, 2))
from table2
and here's what I get:
5300.00
I tried this:
Code:
select (convert(float(9), table2.costvalue, 0))
from table2
and got this:
5300.0
So maybe I am doing the conversions wrong. I am guessing this would be best done in the Where statment even though the code I show is a select.
Any ideas?
Thank you.