I can get the list of UDF from sysobjects. Any simple way to get the
parameter informations?
Txselect r.specific_schema, r.specific_name, p.ordinal_position,
p.parameter_mode, p.parameter_name, p.data_type,
coalesce(p.character_maximum_length, p.numeric_precision) as parm_size
from information_schema.routines r
join information_schema.parameters p on
r.specific_schema=p.specific_schema and r.specific_name=p.specific_name
where r.routine_type='FUNCTION'
order by r.specific_name, p.ordinal_position
nick wrote:
> I can get the list of UDF from sysobjects. Any simple way to get the
> parameter informations?
> Tx
--
Please post DDL, sample data and desired results from that sample data.
Otherwise, all answers can be considered to be nothing more than guesses.
Trey Walpole|||nick (nick@.discussions.microsoft.com) writes:
> I can get the list of UDF from sysobjects. Any simple way to get the
> parameter informations?
For table UDF:
select * from syscolumns
where name like '@.%'
and id = object_id('yourfun')
The condition on name is required to keep the parameters apart from the
output columns.
For a scalar UDF, you may want to take out that condition, if you also
want information about the return value. (Which has a blank name.)
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pr...oads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodin...ions/books.mspx
Monday, March 26, 2012
how to get the parameters information of UDFs?
Labels:
database,
microsoft,
mysql,
oracle,
parameters,
server,
sql,
sysobjects,
theparameter,
udf,
udfs
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment