Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SQL Server and auto conversions? [duplicate]

Possible Duplicate:
Is there a way to turn off implicit type conversion in SQL Server?

With all the respect to SQL Server - which is trying to "help" me by auto conversions :

How can I make commands like these to fail ? :

SELECT 1+1+'2'   --4
SELECT '2'+1+1   --4
SELECT 1+'2'+1   --4
like image 941
Royi Namir Avatar asked Dec 05 '25 06:12

Royi Namir


1 Answers

You can't, although it's requested feature. The problem was already discussed on SO: Is there a way to turn off implicit type conversion in SQL Server?

like image 70
psur Avatar answered Dec 07 '25 23:12

psur



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!