I'm calling an sp(Sp1) from .Net, passing a data table (as SqlDbType.Structured). Sp1 has a parameter defined as a udtt, "CREATE TYPE udttInteger AS Table (Id INT)". Sp1 then dynamically calls Sp2 passing the same udtt parameter.
.Net(Data Table)--> sp1(udtt) -- sp2(udtt)
The problem I'm facing is I appear to lose the content of the uddt in sp2 because my IF statements are effectively being ignored and when I do a count(*) the value is 0.
Is there a limit to how deep you can go with udtt's?