Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Help with UDF
Message
General information
Forum:
Microsoft SQL Server
Category:
Other
Title:
Miscellaneous
Thread ID:
00900778
Message ID:
00900795
Views:
20
Enmanuel,

The error message means that UDF cannot be found for whatever reason. You can use ENterprise Manger or Query Anlyzer Object Browser to see if UDF exists in the Database.

>Hi all, I've created an UDF but when trying to access it I'm getting the error message
>
>Server: Msg 208, Level 16, State 1, Line 1
>object name 'dbo.fn_dias' is invalid.
>
>to call the udf I'm using:
>
>select dbo.fn_dias('2','210001')
>
>
>and here's the code:
>
>CREATE FUNCTION dbo.Fn_Dias (@pCuenta varchar(5),@pTipoMovi varchar(6))
>RETURNS table
> AS
>return SELECT DATEDIFF(Day, (SELECT Fecha
>                          FROM   Transac01
>                          WHERE  Documento = Transac02.documento1 AND
>				             Tipomovi = Transac02.Tipomovi1), fecha)  as dias
>FROM      TRANSAC02
>WHERE     (cuenta = @pCuenta) AND (tipomovi = @pTipoMovi)
>
>
>
>At this time I just don't know what I'm doing wrong, so I'd appreciate any help!
>
>
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform