IF EXISTS ( SELECT * 
            FROM   sysobjects 
            WHERE  id = object_id(N'dbo.CF_Cliente_Clave_Val') 
                   and type = 'FN')
BEGIN
    DROP FUNCTION dbo.CF_Cliente_Clave_Val
END
GO

CREATE FUNCTION [dbo].[CF_Cliente_Clave_Val](@Clave VARCHAR(100)) 
RETURNS TINYINT
AS
BEGIN
DECLARE @Retorno TINYINT

SET @Retorno = 1


RETURN ISNULL(@Retorno,0)

END
