If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > ANSI SQL > user-defined function (UDF) : transact-sql

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 07-01-02, 11:03
macaiba macaiba is offline
Registered User
 
Join Date: Jul 2002
Location: Rio de Janeiro - Brazil
Posts: 2
Question 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.
Reply With Quote
  #2 (permalink)  
Old 07-01-02, 11:28
macaiba macaiba is offline
Registered User
 
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.

Quote:
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.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On