Quantcast
Channel: ฟอรัม Getting started with SQL Server
Viewing all articles
Browse latest Browse all 8428

How does this parameter passing work?

$
0
0

Got these 4 lines of tsql from a trace of an SSIS package. How does it end up passing 127,475,@p4 to ifs_BuildGenericQuery?

declare @p4 nvarchar(max)
set @p4=NULL
exec sp_executesql N'exec ifs_BuildGenericQuery @P1, 475, @P2 out',N'@P1 bigint,@P2 nvarchar(max) OUTPUT',127,@p4 output
select @p4

When I debug the four lines, it ends up passing 127,475,@p4 to ifs_BuildGenericQuery.

CREATE Proc [dbo].[ifs_BuildGenericQuery]
(@RECID int,                     -- 127
@PADFIELDS int,                  -- 475
@SQLQUERY nVarchar(max) output,  -- @p4
@DIAGNOSTICS int = 0)
As
BEGIN
END


Viewing all articles
Browse latest Browse all 8428

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>