gpt4 book ai didi

sql - 关键字 'UPDATE' 附近的语法不正确

转载 作者:行者123 更新时间:2023-12-02 09:26:49 26 4
gpt4 key购买 nike

执行以下过程并在更新时出现语法错误:

USE [OTIDatabaseNewOutreach_V3.2.0_BESQL]
GO
/****** Object: StoredProcedure [dbo].[usp_OTIDataImportConstruction_U] Script Date: 5/12/2016 8:44:18 AM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO

CREATE PROCEDURE [dbo].[usp_OTIDataImportConstruction_U]

UPDATE dbo.[OTI Trainer Data Import]
SET [Construction Industry Card #] = IsNull([c_cardnumberissued],[TrainerIDNumber]),
[Construction Date Issued] = [tblCourse].[c_enddate]
from tblCourse
inner JOIN dbo.tblCourseToStudent ON dbo.tblCourse.c_id = dbo.tblCourseToStudent.c_id
INNER JOIN
dbo.[OTI Trainer Data Import] ON dbo.tblCourseToStudent.t_id = dbo.[OTI Trainer Data Import].t_id
WHERE (c_program ='construction') AND (c_expdate>GetDate());

go

...................................................... ...................... .

最佳答案

看起来像 SQL Server。您需要在create procedure 之后添加一个as。参见手册:https://msdn.microsoft.com/en-za/library/ms187926.aspx

关于sql - 关键字 'UPDATE' 附近的语法不正确,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37188208/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com