I have two ms sql server tables with column of type float (not null).
when I do union ALL in those two tables
SELECT [float_column],
Min(sourcename) AS ExistsInFile
FROM (SELECT [float_column],
'File 1' AS SourceName
FROM table1
WHERE column1 = 'abc'
UNION ALL
SELECT [float_column],
'File 2' AS SourceName
FROM table2
WHERE column1 = 'abc') x
GROUP BY [float_column]
HAVING Count(DISTINCT sourcename) <> 2
it gave me following output, but it should not show any difference as both values are same.
float_Column | ExistsInFile
-53590187.62 File 2
-53590187.62 File 1
Is this because of float type? Any help would be appreciated!