3

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

1
  • Please show us the executed and failing query from the postgresql logfile. I believe this is a setting in the PostgreSQL ODBC driver, but to debug this, I need the exact query done. Commented Feb 1, 2011 at 15:05

2 Answers 2

6

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'

Sign up to request clarification or add additional context in comments.

Comments

0

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"

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.