Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Error with Money datatypes
Message
General information
Forum:
Microsoft SQL Server
Category:
Stored procedures, Triggers, UDFs
Miscellaneous
Thread ID:
00781948
Message ID:
00782241
Views:
21
Hi Allan,

You're welcome.

>Sergey,
>
>Like always - right on the money! Thanks for your assistance yet again.
>
>Al
>
>>Hi Allan,
>>
>>When you concatenate string (char, nchar) with other data types, SQL Server may perform implicit conversion of those types to the char/nchar. In BOL CAST and CONVERT there's a chart that shows all explicit and implicit data type conversions allowed for SQL Server system-supplied data types. According to it, money data type can be converted to nchar only explicitly (CAST or CONVERT).
	(TransactionDetails.AmountMN Between '+
>>         CAST(@LowAmountMN AS nvarchar(32) + ' AND '+
>>         CAST(@HighAmountMN AS nvarchar(32)) + ')' +
I prefer always use explicit conversion so I can control result of it.
>>>
--sb--
Previous
Reply
Map
View

Click here to load this message in the networking platform