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
Exchange 2010. Install Failed, now can't uninstall
Exchange 2007 installation on a Windows 2008 server.
BES and NSPI connections
Raid 1 Rebuild Failed - Adaptec 1210SA
Is there a user_packages table synonymous to the user_tables table?
Can't connect to local MySQL server through socket
Error message when replying, sending, openning email in OWA
How do I unlock an Imation flash drive
DCOM was unable to communicate with the computer "Name" using any of the configured protocols.
Intel Core 2 Quad CPU Overheating Issues