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,
MartinThis 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/
"Martin H." <Martin H.@.discussions.microsoft.com> wrote in message
news:BA5DD35C-2FAD-473D-9524-0915FB29AF30@.microsoft.com...
> 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,
> Martin|||Martin H. wrote:
> 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...
--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/ AwUBQlJLyIechKqOuFEgEQKibgCcD46kIxMkKQya
73lwxg0DrXcPIOoAn0Zr
W/GAuqaueyUtevN4hQnU1T0D
=/yvi
--END PGP SIGNATURE--
Monday, March 12, 2012
Getting parameter's user-defined datatype?
Labels:
corresponding,
database,
datatype,
field,
fromsystem,
microsoft,
mysql,
oracle,
parameter,
routine,
server,
sql,
tables,
user-defined,
viewsi
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment