Groups | Blog | Home
all groups > sql server programming > april 2005 >

sql server programming : Getting parameter's user-defined datatype?


Martin H.
4/4/2005 11:53:03 PM
Hey,
Is there any way to get routine's parameter's user-defined datatype from
system tables/views?
I see there is a corresponding field in INFORMATION_SCHEMA.PARAMETERS view,
but it is said to be for future use...

Thank You in advance,
MGFoster
4/5/2005 8:26:33 AM
[quoted text, click to view]

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

This works:

select parameter_name, data_type
from information_schema.parameters
where specific_name = 'procedure name'

Substitute your procedure name in the WHERE clause.

--
MGFoster:::mgf00 <at> earthlink <decimal-point> net
Oakland, CA (USA)

-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Charset: noconv

iQA/AwUBQlJLyIechKqOuFEgEQKibgCcD46kIxMkKQya73lwxg0DrXcPIOoAn0Zr
W/GAuqaueyUtevN4hQnU1T0D
=/yvi
Tibor Karaszi
4/5/2005 10:10:12 AM
This should server as a starting point:

SELECT *
FROM syscolumns as sc
INNER JOIN systypes AS st on sc.xtype = st.xtype
where sc.id IN (SELECT id FROM sysobjects WHERE type = 'P')


--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/


[quoted text, click to view]

AddThis Social Bookmark Button