Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where are user defined functions stored in MS SQL Server 2008?

I want to be able to see the code associated with the User Defined Function. I can see the name etc by doing the following,

select * from information_schema.routines where routine_type='function'

Which is all fine and dandy but I can actually see the code. Do I need to do this in SQL Server Management Studio, and if so how?

Thanks for all the help, I'm a noob when it comes to IIS/MS SQL stuff.

like image 217
Skylude Avatar asked Jan 10 '12 23:01

Skylude


1 Answers

In SQL Server Management Studio (SSMS) look under the Programmability\Functions branch.

enter image description here

Since you asked, here is how to do it in SQL, not that it will help you if you don't have permissions.

EXEC sp_HelpText 'someUserDefinedFunction'
like image 95
JohnFx Avatar answered Oct 30 '22 16:10

JohnFx