Question

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?

Was it helpful?

Solution

Try

UPDATE xxx SET column= null WHERE IsNumeric(column)=0

Then run your select again.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top