Tuesday, March 27, 2012

Enumerate SQL Server built-in functions

Hi

I am trying to build a tree similar to the one in SQL Server Management Studio for the system functions in the SQL language.

I would like to group them by type (e.g. string functions) and display information about the parameters and return types, etc.

Is there a way to get these programmatically? I would like to avoid typing them out by hand.

Thanks

Chris

Hi Chris,

I'm not sure this is the right forum for this question. You can retrieve this information from the sytem views. E.g.:

select

ob.name as func,

parms.name as parm,

parms.parameter_id as pid,

ty.name as type

from

sys.all_objects ob,

sys.all_parameters parms,

sys.types as ty

where

ob.type = 'FN'

and ob.object_id = parms.object_id

and parms.user_type_id = ty.user_type_id

You can tweak this to get exactly what you're looking for.

Cheers,

-Isaac

|||I guess he means the really builtin functions like CHARINDEX and so on. Otherwise I would have suggested him to use the INFORMATION_SCHEMA views to retrieve the data.

HTH; Jens K. Suessmeyer.

http://www.sqlserver2005.de|||

Jens

that's right. I do mean the really built-in functions.

Thanks anyway.

Chris

|||

I asked some of the gurus here. Alas, it looks like there really isn't a way to do this.

Sorry,

-Isaac

|||

Thanks anyway Isaac.

Chris

No comments:

Post a Comment