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
The object invoked has disconnected from its clients.
Problem with file name comparison in unix script
NDMP backup failure(99)
mouseleave event on panel, vb.net winforms
Install issue: XenApp 5 Feature Pack 3 on W2K8x64
Public Desktop Icons not showing in RDP sessions
How many keywords is too many in the meta data?
Change primary smtp addresses for 29 users using powershell for exchange
Best AV for 2008 R2 64bit
Difference between Icefaces,myfaces,richfaces
in JSF?