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
 General SQL Server Forums
 New to SQL Server Programming
 Retrieving the list of UDF's

Author  Topic 

ZarrinPour
Yak Posting Veteran

66 Posts

Posted - 2008-08-29 : 04:10:54
Hi all
Could anyone tell me how i can retrieve the list of User Defianed Functions of a database?

Kind Regards,

Nothing is quite impossible!

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2008-08-29 : 04:14:03
[code]select *
from INFORMATION_SCHEMA.ROUTINES
where ROUTINE_TYPE = 'FUNCTION'[/code]


KH
[spoiler]Time is always against us[/spoiler]

Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-08-29 : 04:14:18
select * from INFORMATION_SCHEMA.ROUTINES WHERE ROUTINE_TYPE='FUNCTION'
Go to Top of Page

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2008-08-29 : 04:15:16
it is CS


KH
[spoiler]Time is always against us[/spoiler]

Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2008-08-29 : 04:16:12
use small characters [ sniped ]



E 12°55'05.25"
N 56°04'39.16"
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-08-29 : 04:16:16
quote:
Originally posted by khtan

it is CS


KH
[spoiler]Time is always against us[/spoiler]




Go to Top of Page

sunil
Constraint Violating Yak Guru

282 Posts

Posted - 2008-08-29 : 04:17:11
select * from sys.objects where type in ('FN','TF')
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-08-29 : 04:20:57
quote:
Originally posted by sunil

select * from sys.objects where type in ('FN','TF')


and use sysobjects table if sql 2000
better to use INFORMATION_SCHEMA views as it will be same in both 2000 & 2005
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2008-08-29 : 04:55:57
quote:
Originally posted by sunil

select * from sys.objects where type in ('FN','TF')


You should also include 'IF' which is for SQL_INLINE_TABLE_VALUED_FUNCTION

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -