I have a SQLite database with a table named measurements, which contains some experimental data measured by a power meter. They're stored as data type REAL in a field named power_dbm. In some measurements, the readings can be off the scale, the meter cannot obtain a reading due to overrange or underrange, thus the values +Inf and -Inf are used to represent these values.
For example, here is some of the data.
sqlite> SELECT power_dbm, typeof(power_dbm) from measurements;
-10.312|real
-9.908|real
-11.344|real
-Inf|real
As you see, there's a floating-point number of negative infinity. Unfortunate I don't know the correct syntax to select these values from the database. I tried:
sqlite> SELECT freq_hz, power_dbm from measurements WHERE power_dbm=-Inf;
Error: no such column: Inf
sqlite> SELECT freq_hz, power_dbm from measurements WHERE power_dbm='-Inf'
(nothing returned)
sqlite> SELECT freq_hz, power_dbm from measurements WHERE power_dbm='-infinity';
(nothing returned)
sqlite> SELECT freq_hz, power_dbm from measurements WHERE power_dbm=-1/0;
(nothing returned)
sqlite> SELECT freq_hz, power_dbm from measurements WHERE power_dbm is -1/0;
(incorrect results returned, power_dbm is null instead of negative infinity)
What is the correct syntax to specify the literal value of positive or negative infinity in SQL/SQLite? Any additional references to relevant documentation will also greatly be appreciated.