此更新声明中有什么错误:
declare @s1from datetime
UPDATE Table1 SET Product = @Product , fare = @fare, s1from = convert(datetime,convert(datetime,@s1from,103),120)
答案 0 :(得分:0)
这个表达式: convert(datetime,convert(datetime,GETDATE(),103),120)工作正常,所以如果你得到一个错误你可能会忘记设置@ s1from的值,你的代码中没有行。试试
DECLARE @s1from datetime
SET @s1from = GETDATE()
SELECT convert(datetime,convert(datetime,@s1from,103),120)