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
Dot Net IL Code to C# conversion
Is it possible to mirror two physical disks?
Linux/php serial port read - How to stop fread() waiting forever if no new data?
Question about Exchange 2010 mailbox move.
Best Practice for Domain Administrator - Windows Server 2003
ScrollText In DialgBox? - Delphi
GZip Partially Working
Sending and receiving limits on Exchange users internally and externally
Exchange 2010 setup.com /preparead fails
Dell PowerEdge Perc 4e/Di RAID 1 expansion