I can not convert datatype from nvarchar and null to decimal
enter image description here I met the error. How can I resolve it. I think I should remove null after casting the datatype. Please help me, I just a beginner to practice SQL.
I can not convert datatype from nvarchar and null to decimal
enter image description here I met the error. How can I resolve it. I think I should remove null after casting the datatype. Please help me, I just a beginner to practice SQL.
Copyright © 2021 Jogjafile Inc.
in SQL to convert from nvarchar to numeric you can use 2 different methods. The first is CAST():
And the expression to use it correctly is this:
CAST(expression AS datatype(length))The second is CONVERT():
And the expression is this:
CONVERT(data_type(length), expression, style)