新问题
我在网上研究了如何使用 SQL 中的强制转换功能。我遵循与示例相同的格式,但仍然不起作用。有什么建议么?它给了我与下面相同的错误消息。
这就是我正在尝试做的事情:
update dbo.TableName
set cast(columnName1 as decimal (9,1)) = 10,
cast(columnName2 as decimal (9,1)) = 11
where ... etc
Run Code Online (Sandbox Code Playgroud)
上一篇文章:
When compiling my code, I get this error message: "Microsoft.Rules.Data: Data loss might occur when casting from Integer to Decimal(9,1)." So I put a basic cast in there (see below) and for some reason it doesn't work. Any suggestions? I get the following error messages:
-- 1). SQL 80001: Incorrect syntax near'0'. Expecting '(', or SELECT. …Run Code Online (Sandbox Code Playgroud)