我收到此错误
'('
附近的语法不正确
我找不到语法问题在哪里。怎么了?如何解决?
INSERT INTO Recurring (WO_DespatchName,
FORMAT(start_date, 'dd/MMM/yyyy hh:mm tt') AS start_date,
WO_MaidName, WO_CustomerName, WO_Address,
FORMAT (end_date, 'dd/MMM/yyyy hh:mm tt') AS end_date,
WO_ContactNumber, WO_Addresss)
VALUES (@WO_DespatchName, @start_date,
@WO_MaidName, @WO_CustomerName, @WO_Address,
@end_date, @WO_ContactNumber, @WO_Addresss);
SELECT SCOPE_IDENTITY();
答案 0 :(得分:2)
您假设将FORMAT
用于values
。尝试如下更新查询。
INSERT INTO Recurring (WO_DespatchName,
start_date,
WO_MaidName, WO_CustomerName, WO_Address,
end_date,
WO_ContactNumber, WO_Addresss)
VALUES (@WO_DespatchName,
FORMAT(@start_date, 'dd/MMM/yyyy hh:mm tt'),
@WO_MaidName, @WO_CustomerName, @WO_Address,
FORMAT (@end_date, 'dd/MMM/yyyy hh:mm tt'),
@WO_ContactNumber, @WO_Addresss);
SELECT SCOPE_IDENTITY();