|
Useless, given the initial value, the execution tracking is still the same
declare @ P1 nvarchar (30)
set @ P1 = NULL
exec sp_executesql N'UP_Production_Authenticate ', N' @ sOrdNo nvarchar (100), @sSubOrdNo nvarchar (100), @sStaff nvarchar (100), @sResult nvarchar (30) output ', @sOrdNo = N'9042', @sSubOrdNo = N'14-002 ', @sStaff = N'lily', @sResult = @ P1 output
select @ P1
I have another stored procedure
CREATE PROCEDURE UP_frmMessage_Read
@sStaff nvarchar (10),
@sResult nvarchar (10) output
AS
select iXh, sNo, sReceipt, sMessage, sSender, dNow from tblMessage where sReceipt = @ sStaff and sStatus <> 3
if @@ rowcount = 0
set @ sResult = 'No'
else
set @ sResult = 'Yes'
Tracked out is
declare @ P1 nvarchar (10)
set @ P1 = N'No '
exec UP_frmMessage_Read @sStaff = N'lily ', @sResult = @ P1 output
select @ P1
This does not give an initial value, why is the set @ P1 = N'No ', not a NULL value? |
|