O
O
Oleg Petrov2018-11-27 07:51:39
PostgreSQL
Oleg Petrov, 2018-11-27 07:51:39

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

The table has column type Double precision, I can't change it to Numeric because of "infinity" cells
ERROR: cannot convert infinity to numeric
How can I change "infinity" to NaN to convert column type in table?
I will be grateful for help

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Stalker_RED, 2018-11-27
@Smeilz1

UPDATE myTable SET myCol='NaN' WHERE myCol='Infinity'

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question