Skip to content
Advertisement

Postgres: Where value equal decimal value

My table looks like this:

source table for query

When the WHERE clause is equal to value with decimal point I get no valid output like:

Output: transponder_id = None

When the query is for integer value, query works correctly:

Output: transponder_id = 1009

Also using BETWEEN query returns expected values

Output: transponder_id = 1010

Why is my query using ‘equal’ operator not working with decimal values? I don’t like the between solution as it require to set tolerance range. How the query should be defined to work also with decimal values?

Advertisement

Answer

Put it under single quotes :

DEMO

User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement