General information
Forum:
Microsoft SQL Server
Title:
Function returns null
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.
Thank´s-
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
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only