sql - SQL“','附近的语法不正确”
问题描述
所以这是代码:
create procedure udp_import_oltp_data
as
truncate table customer_stg
insert into customer_stg
(
customer_no,
customer_name,
customer_address,
po_address,
zip_code,
city,
region,
country
)
select (customerid, cust_name, (street_no + ' ' + street_name), po_address, zip, town_city, area, country) from [1385651_OLTP].dbo.customer
“customerid”后面的逗号就是它所说的那个,我也把它用于“国家”后面的右括号。我做了一些搜索,但找不到任何东西。
解决方案
不要在选择列列表周围使用括号。它应该是:
select customerid, cust_name, (street_no + ' ' + street_name), po_address, zip, town_city, area, country
from ...
推荐阅读
- python - Insert column based on related column value
- docker - 从 dockerfile 构建的 docker 容器运行时无法连接到 Rabbit MQ 实例
- java - 生成在 Spring Tool Suite 中不起作用的 getter 和 setter
- python - 当我尝试使其成为功能时不起作用
- oracle - 如何从替换过程(PL/SQL)中获取旧代码?
- asp.net - asp.net redirect fails on undefined id
- json - 使用 groovy LAX 解析器解析 JSON 会给出错误的键
- combobox - 带有 Vaadin Grid 和 ComponentRenderer 以及 Empty Grid 的 ComboBox
- c# - 创建列表字典
从一系列 pocos 中? - php - Recaptcha 用户验证错误查询