Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Function returns null
Message
From
14/03/2004 16:21:21
 
General information
Forum:
Microsoft SQL Server
Category:
Other
Miscellaneous
Thread ID:
00886122
Message ID:
00886128
Views:
12
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
>
Previous
Reply
Map
View

Click here to load this message in the networking platform