Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 Function returns table

Author  Topic 

Zath
Constraint Violating Yak Guru

298 Posts

Posted - 2009-09-15 : 15:23:55
I have a function that returns a table.

fn_iter_charlist_to_table(@IDs, DEFAULT)


  CREATE FUNCTION fn_iter_charlist_to_table
(@list ntext,
@delimiter nchar(1) = N',')
RETURNS @tbl TABLE (listpos int IDENTITY(1, 1) NOT NULL,
str varchar(4000),
nstr nvarchar(2000)) AS

BEGIN
--and so on



Having a bit of trouble

Msg 195, Level 15, State 10, Line 6
'fn_iter_charlist_to_table' is not a recognized function name.

And using SQL server 2000. Yes, I know wrong forum but it's going to
go on 2005 as well.

Thanks for any input,

Zath

TG
Master Smack Fu Yak Hacker

6065 Posts

Posted - 2009-09-15 : 15:46:52
try this:
when you create the function as well as call the fuction include the schema as part of the name. ie: dbo.fn_iter_charlist_to_table

Be One with the Optimizer
TG
Go to Top of Page

webfred
Master Smack Fu Yak Hacker

8781 Posts

Posted - 2009-09-15 : 15:48:53
You have to give the schema when calling this function.
Example:
dbo.fn_iter_charlist_to_table(@IDs, DEFAULT)



No, you're never too old to Yak'n'Roll if you're too young to die.
Go to Top of Page

webfred
Master Smack Fu Yak Hacker

8781 Posts

Posted - 2009-09-15 : 15:49:19



No, you're never too old to Yak'n'Roll if you're too young to die.
Go to Top of Page

sqlfresher2k7
Aged Yak Warrior

623 Posts

Posted - 2009-09-15 : 15:49:35
CREATE FUNCTION dbo.fn_iter_charlist_to_table
Put dbo.

use the function with
select dbo.dbo.fn_iter_charlist_to_table

It should work..
Go to Top of Page

webfred
Master Smack Fu Yak Hacker

8781 Posts

Posted - 2009-09-15 : 15:50:36
Oh I see - I can go to sleep


No, you're never too old to Yak'n'Roll if you're too young to die.
Go to Top of Page

sqlfresher2k7
Aged Yak Warrior

623 Posts

Posted - 2009-09-15 : 15:51:13
use the function with
dbo.fn_iter_charlist_to_table
Go to Top of Page

TG
Master Smack Fu Yak Hacker

6065 Posts

Posted - 2009-09-15 : 15:56:26
pleasant dreams - enjoy the echo :)

Be One with the Optimizer
TG
Go to Top of Page
   

- Advertisement -