PostgreSQL – ERROR: operator does not exist: integer = character varying

Example:
[code type=sql]

select ExampleName as “name”
from ExampleTable
where ExampleId = ?::integer
order by ExampleName ASC

? :: integer is a type cast in the PostgreSQL shorthand syntax. You can write the SQL standard CAST(? AS integer) if you prefer.

http://stackoverflow.com/questions/18128806/error-operator-does-not-exist-integer-character-varying-using-postgres-8-2

Share and Enjoy !

0Shares
0 0