Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2008 Forums
 Transact-SQL (2008)
 Debug UDT code

Author  Topic 

sqlpal2007
Posting Yak Master

200 Posts

Posted - 2010-10-28 : 08:18:28
Hello All,

I have to debug a sproc which uses UDT - User Defined Table type. I captured the parameters in trace. Now how do I run the SQL code to pass the UDT to a parameter?

Debugging the stored procedure code
UDT has one row with these values in trace (1,N'Food','NP1010',230)

declare
@ID INT
,@ProdID VARCHAR(25)
,@CategoryID INT
,@UsrID INT
,@ProductDetails as dbo.ProdDetails_UDT
declare
@ID = 112
,@ProdID = 'C0010'
,@CategoryID = 3
,@UsrID INT = 1111
,@ProductDetails as dbo.ProdDetails_UDT -???

Please let me know how to initialize @ProductDetails with UDT value.

Thanks,

   

- Advertisement -