How to replace cells in a PostgreSQL column of type "infinity" on NaN?


Warning: count(): Parameter must be an array or an object that implements Countable in /home/styllloz/public_html/qa-theme/donut-theme/qa-donut-layer.php on line 274
0 like 0 dislike
23 views
The table has a type column Double precision, I can't replace Numeric due to the presence of cells "infinity"
ERROR: cannot convert infinity to numeric
How do I replace the "infinity" to NaN in order to convert the data type of a column in a table?
I would be grateful for help
by | 23 views

1 Answer

0 like 0 dislike
UPDATE myTable SET myCol='NaN' WHERE myCol='Infinity'
by
110,608 questions
257,186 answers
0 comments
36,634 users