Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Function returns null
Message
De
14/03/2004 16:21:21
 
 
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Autre
Divers
Thread ID:
00886122
Message ID:
00886128
Vues:
13
That's the problem i execute the query and it returns a value but the function returns null.

>You'll get null if there're no records matching query conditions.
>
>>I ´ve designed this function in sql server but it returns null instead of the correct value, i execute the sql query and i see the correct value.
>>
>>Any Idea what is wrong.
>>
>>
>
>>ALTER FUNCTION dbo.TotVenci
>>	(@IdCliente Int,
>>	@hasta datetime	)
>>RETURNS money
>>AS
>>	BEGIN
>>	Declare @totvenci money
>>	set @totvenci=(select sum(venci.importe) from venci where
>>		venci.IdCliente=@IdCliente and venci.fecha<=@hasta )
>>		RETURN @totvenci
>>	END
>
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform