Scalar-valued Functions [dbo].[float8]
Properties
PropertyValue
ANSI Nulls OnYes
Quoted Identifier OnNo
Parameters
NameData TypeMax Length (Bytes)
@inputsql_variant8016
SQL Script
SET QUOTED_IDENTIFIER OFF
GO

/****** Object:  User Defined Function dbo.float8    Script Date: 12/1/2005 11:50:34 PM ******/

CREATE FUNCTION [dbo].[float8](@input sql_variant )  
RETURNS float(53) AS  
BEGIN
    DECLARE    @type nvarchar(30)
    SET @type = CONVERT(nvarchar(30), SQL_VARIANT_PROPERTY(@input, 'BaseType'))
    --SET @type = SQL_VARIANT_PROPERTY(@input, 'BaseType')
    IF( (@type = 'varbinary') OR (@type = 'binary') OR
        (@type = 'timestamp') OR (@type = 'uniqueidentifier') OR
        (@type = 'image') OR (@type = 'ntext') OR (@type = 'text'))
        RETURN 0
    RETURN CONVERT(float(53), @input)
END


GO
Uses
Used By