sql_variant and real and float in combination with WHERE smaller statements

215 Views Asked by At

I am using a sql_variant field at MS SQL Server 2019. Select queries containing a WHERE < clause are not working when inserting a number as real or float. It does work when insering as numeric. Not working means, smaller values were not selected.

Unfortunately there is no C# numeric sql type, but only SqlDbType.Float or SqlDbType.Real.

Any idea how use sql_variant as float or real in combination with WHERE smaller statements?

0

There are 0 best solutions below