Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Return Stored Proc Parameters
Message
 
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Miscellaneous
Thread ID:
01406967
Message ID:
01416070
Views:
45
>I found the problem - we need to join on xType, not by Type to SysTypes
>
>declare @ProcID int
>Select @ProcID = OBJECT_ID from  sys.procedures P where p.Name = 'ap_NewWarehouse'
>
>SELECT syscolumns.Name AS ParamName, systypes.Name as DataType, syscolumns.length 
>	FROM syscolumns INNER JOIN systypes ON syscolumns.xtype = systypes.xtype where 
>	SysColumns.ID = @ProcID
>	Order by syscolumns.Name
>	
>
Much simpler version
Select  *   
   From   Information_Schema.Parameters   
   Where  Specific_Name = 'ap_NewWarehouse'
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform