问题
I am working on an old database I inherited from my predecessors.
In it, some float fields contains NaN where there should be a null.
The following SQL doesn't work because it doesn't recognize NaN.
UPDATE xxx SET column= null WHERE column=NaN
How can I do this?
回答1:
Try
UPDATE xxx SET column= null WHERE IsNumeric(column)=0
Then run your select again.
来源:https://stackoverflow.com/questions/450618/nan-values-in-a-float-field-in-mssql-database