CREATE PROCEDURE MyProc @P1 varchar(6), @P2 int, @P3 int OUTPUT AS ...A typical passthrough execution setup and string might be:
PRIVATE lnP3 lnP3 = 0 lcSQL = [EXEC MyProc 'ABCD', 1, ?@lnP3]Now suppose I want to pass by reference omitting @P2 and allowing it to default to its default value in the SP but still get the output parameter back. Is this possible and if so, what would the syntax be? I have tried things like:
PRIVATE lnP3 lnP3 = 0 lcSQL = [EXEC MyProc @P1 = 'ABCD', @P3 = ?@lnP3]but this does not seem to work. If it is possible I'm missing something in the syntax.