Microsoft
Software
Hardware
Network
Question : SQL Server 2005 Casting behaviour
select cast('*' as int)
GO
--- Conversion failed when converting the varchar value '*' to data type int.
GO
select cast('+' as int)
GO
-- This works fine
-- Result- 0
GO
select cast('-' as int)
GO
-- Works Fine
-- Result 0
GO
select cast('/' as int)
GO
-- Conversion failed when converting the varchar value '/' to data type int.
GO
I am unable to understand why few airthmetic operator working fine but few not...
any one could you please explain this behavior.. I am working to fix one production issue....
Answer : SQL Server 2005 Casting behaviour
You aren't casting the addition and subtraction operators, you are casting the positive and negative notation and it just makes the assumption that the numeric part is 0. +0 = + = 0
Random Solutions
SQLServer Query, Pivot and/or Cross tab or whatever
xml are both of the examples below valid?
open and read a *.xlsx file
I am new to webservices, please help.
new keyboard not recognised before logon
XP runs slow error 0XC000005e,The Security System detected an attempted downgrade attack for server
Changing Server Name with Exchange 2010 Installed
My Computer prints Very Tiny on Fresh Install
PayPal with CreditCard
How to enable VSS Writer for Exchange 2003 and SQL 2005