Postgres SQL 运算符不存在;字符=整数;
我正在复制两个数据库(SQL Server 2000 和 PostgreSQL)。我使用 http://blog。 hagander.net/archives/103-Replicating-from-MS-SQL-Server-to-PostgreSQL.html 为此。然后我做了最后一步
ERROR: operator does not exist: character = integer; Error executing the query
出现的事情。我使用 PostgreSQL 8.4.6 和来自 此处 我还尝试删除并安装 Synaptic 称为 9.0.2-1 的版本并更新我尝试的 odbc 驱动程序(psqlodbc_09_00_0100.zip、psqlodbc_09_00_0101.zip、psqlodbc_09_00_0200.zip),它也会返回该错误。从delphi启动的查询,我只使用系统DSN运行正常
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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您需要修复您的 SQL 语句。
我打赌您有类似
WHERE character_column = 1
的内容,您需要将其更改为
WHERE character_column = '1'
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'
对非数字数据使用
单引号
'your_value',对列名称使用双引号
,切勿反之。选择状态,总和(金额)作为“销售”的总和,其中(“日期”<='2017-04-30 23:59:59'和“customer_id”= 1)和“销售”。“deleted_at”为空按“状态”分组
use
single quote
'your_value' for non numeric data anddouble 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"