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)
 how to execute function?

Author  Topic 

ri16
Yak Posting Veteran

64 Posts

Posted - 2008-02-13 : 16:25:16
i have created one function i want to see results in it..

how to execute it?

i done;
exec testfunc(1)
but it gives error

CREATE function testfuc (@ID sysname = Null ) -- you get a table that could be used in a where clause of a query
returns table AS
Return (
select * from testview
where CharIndex(','+rtrim(ID)+',',
','+ @ID +',') > 0
or ID like isNull(@ID,'%%')

)

how can i execute this func to see results.
cana anyone knows?

thanks.

sodeep
Master Smack Fu Yak Hacker

7174 Posts

Posted - 2008-02-13 : 17:01:20
SELECT * FROM dbo.testfunc
Go to Top of Page
   

- Advertisement -