非常感谢任何帮助 - 尝试将数据插入到我的数据库中的表中时遇到问题。
CREATE TABLE dwr2."DimCustomers"
(
"customer_id" smallint NOT NULL,
"company_name" VARCHAR (50) NOT NULL,
"contact_name" VARCHAR (50) NOT NULL,
"contact_title" VARCHAR (50) NOT NULL,
"address" VARCHAR (50) NOT NULL,
"city" VARCHAR (50) NOT NULL,
"region" VARCHAR (50) NOT NULL,
"postal_code" VARCHAR (50) NOT NULL,
"country" VARCHAR (50) NOT NULL,
"phone" VARCHAR (50) NOT NULL,
"fax" VARCHAR (50) NOT NULL,
PRIMARY KEY ("customer_id")
)
INSERT INTO dwr2."DimCustomers" (customer_id, company_name, contact_name,
contact_title, address, city, region, postal_code, country, phone, fax)
SELECT customer_id,company_name,contact_name,contact_title,
address,city,region,postal_code,country,phone,fax
FROM public.customers where customer_id!=0;
我收到以下错误:
ERROR: operator does not exist: character <> integer
LINE 3: FROM public.customers where customer_id!=0;
^
HINT: No operator matches the given name and argument types. You might need
to add explicit type casts.
SQL state: 42883
Character: 295
在我遇到这个问题之前,所有其他表格插入都可以处理现在的问题......对程序不够熟悉以理解错误......我已经尝试了很多尝试和代码更改。任何帮助深表感谢。谢谢你。