开发者

whats wrong in this update statement :?

开发者 https://www.devze.com 2023-02-15 17:51 出处:网络
whats wrong in this update statement : declare @s1from datetime UPDATE Table1 SET Product = @Product , fare =开发者_运维知识库 @fare, s1from = convert(datetime,convert(datetime,@s1from,103),120)

whats wrong in this update statement :

declare @s1from datetime
UPDATE Table1 SET Product = @Product , fare =开发者_运维知识库 @fare, s1from = convert(datetime,convert(datetime,@s1from,103),120)


this expression: convert(datetime,convert(datetime,GETDATE(),103),120) works fine, so if you get an error you might forget about setting the value of @s1from, there is no line in your code. Try

DECLARE @s1from datetime

SET @s1from = GETDATE()

SELECT convert(datetime,convert(datetime,@s1from,103),120)

0

精彩评论

暂无评论...
验证码 换一张
取 消