Results 1 to 2 of 2
  1. #1
    Join Date
    Jul 2002
    Location
    Rio de Janeiro - Brazil
    Posts
    2

    Question Unanswered: user-defined function (UDF) : transact-sql

    Hi,

    I have created a udf called 'udfListLen' :

    ---
    create function udfListLen(@list text, @delimiter varchar(10)) returns int
    as
    begin
    return 171
    end
    ---

    The script created the funcion, as I see it by executing:

    sp_helptext udfListLen

    But when I call it from inside a stored-procedure I receive the following error message :

    "Server: Msg 195, Level 15, State 10, Line 3
    'udfListLen' is not a recognized function name."

    Does anyone has any idea of what´s happening ?

    TIA,
    Macaíba.

  2. #2
    Join Date
    Jul 2002
    Location
    Rio de Janeiro - Brazil
    Posts
    2

    Re: user-defined function (UDF) : transact-sql > solved

    Hi,

    Just prefix the function name with :

    database_name.owner_name

    Eg,

    print Foo.bar.udfListLen(param1,...)

    PS: The funny thing is that when executing sp_helptext we don´t need to
    qualify the function name as above.

    Macaíba.

    Originally posted by macaiba
    Hi,

    I have created a udf called 'udfListLen' :

    ---
    create function udfListLen(@list text, @delimiter varchar(10)) returns int
    as
    begin
    return 171
    end
    ---

    The script created the funcion, as I see it by executing:

    sp_helptext udfListLen

    But when I call it from inside a stored-procedure I receive the following error message :

    "Server: Msg 195, Level 15, State 10, Line 3
    'udfListLen' is not a recognized function name."

    Does anyone has any idea of what´s happening ?

    TIA,
    Macaíba.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •