Postgres SQL statement does not exist; character = integer;

I am replicating two databases (SQL Server 2000 and PostgreSQL). For this I am using http://blog.hagander.net/archives/103-Replicating-from-MS-SQL-Server-to-PostgreSQL.html . Then i take the last step

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

appeared. I am using PostgreSQL 8.4.6 for these and ODBC drivers (all psqlodbc_08_04_0100.zip, psqlodbc_08_04_0200.zip) from here I am also trying to uninstall and install the version that Synaptic named 9.0.2-1 and updated the odbc drivers that I am trying (psqlodbc_09_0001 .zip, psqlodbc_09_00_0101.zip, psqlodbc_09_00_0200.zip), it also returns this error. The request launched from delphi, where I use only System DSN, works fine

+3
source share
2 answers

You need to fix your SQL statement.

I'm sure you have something like

WHERE character_column = 1

and you need to change this to

WHERE character_column = '1'

+6
source

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

select the status, amount (amount) in the form of the amount of "sales", where ("date" <= '2017-04-30 23:59:59' and "customer_id" = 1) and "sales". "deleted_at" is a zero status group

0
source

Source: https://habr.com/ru/post/1789172/


All Articles