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)
 udf function

Author  Topic 

rjhe22
Constraint Violating Yak Guru

283 Posts

Posted - 2010-02-23 : 12:14:40
can u select * FROM A UDF FUNCTION

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2010-02-23 : 12:19:45
yup. provided the UDF function is of table valued type i.e returns a table

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2010-02-23 : 12:20:19
see an example here

http://visakhm.blogspot.com/2010/02/parsing-delimited-string.html

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page

rjhe22
Constraint Violating Yak Guru

283 Posts

Posted - 2010-02-23 : 12:21:16
its a scalar one.
any way to select from that one
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2010-02-23 : 12:24:36
yup. just select like a scalar value (select 1)

SELECT dbo.yourfunction(paramvalu1,paramvalue2,...)


------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page

rjhe22
Constraint Violating Yak Guru

283 Posts

Posted - 2010-02-23 : 12:25:08
wil try that thanks
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2010-02-23 : 12:29:57
welcome
lets us know how you got on

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page

rjhe22
Constraint Violating Yak Guru

283 Posts

Posted - 2010-02-23 : 12:30:42
that worked
again thanks
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2010-02-23 : 12:33:23
cool
cheers

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page
   

- Advertisement -