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

Click here to load this message in the networking platform