开发者

Postgres SQL operator does not exist; character = integer;

开发者 https://www.devze.com 2023-02-07 16:22 出处:网络
I am do replicating of two database (SQL Server 2000 and PostgreSQL). I use http://blog.hagander.net/archives/103-Replicating-from-MS-SQL-Server-to-PostgreSQL.html for this. Then I do last step the

I am do replicating of two database (SQL Server 2000 and PostgreSQL). I use http://blog.hagander.net/archives/103-Replicating-from-MS-SQL-Server-to-PostgreSQL.html for this. Then I do last step the

ERROR: operator does not exist: character = integer; Error executing the query

appeared. I use the PostgreSQL 8.4.6 for that and ODBC drivers (all psqlodbc_08_04_0100.zip, psqlodbc_08_04_0200.zip) from here i also try to delete and install version that Synaptic called 9.0.2-1 and update odbc drivers i try开发者_运维百科 (psqlodbc_09_00_0100.zip, psqlodbc_09_00_0101.zip, psqlodbc_09_00_0200.zip) it also return that error. The query launched from delphi where i use only System DSN runs normally


You need to fix your SQL statement.

I bet you have something like

WHERE character_column = 1

and you need to change that to

WHERE character_column = '1'


use single quote 'your_value' for non numeric data and double quote for column name and never the opposite.

select status, sum(amount) as sum from "sales" where ("date" <= '2017-04-30 23:59:59' and "customer_id" = 1) and "sales"."deleted_at" is null group by "status"

0

精彩评论

暂无评论...
验证码 换一张
取 消