How to do - MS SQL C# Excel Access
Saturday, 17 February 2018
MSSQL - Fix Error - Operand data type varchar is invalid for sum operator.
Watch this example on YouTube
To fix it replace
Declare @Amount As Varchar(10) = '200'
Select Sum(@Amount) as Amount
with
Declare @Amount As Varchar(10) = '200'
Select Sum(
Cast(@Amount As Money)
) as Amount
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment