具有以下脚本用于 StoredProcedure..
CREATE PROCEDURE [dbo].[GetInvestorForExtractReport]
-- Add the parameters for the stored procedure here
@rptPrm_AccountNumber varchar(8000),
@SettlmentDate as datetime
with encryption
AS
-- SET NOCOUNT ON added to prevent extra result sets from
-- interfering with SELECT statements.
SET NOCOUNT ON;
-- Insert statements for procedure here
SELECT distinct
I.InvestorID,
I.InvestorName As [Nombre Inversionista],
substring(IA.AccountNumber,1,3) accountnumber,
isnull(AGSL.CashGuarantee,0) As [Garantia Efectivo],
I.DocumentType As [Tipo Documento],
I.DocumentNumber As [Numero Documento],
substring(I.MainAccount,1,3) As [Cuenta CRCC],
I.InternalInvestorNumber As [Cuenta Interna],
SUBSTRING(CONVERT(VARCHAR,getdate(),120),1,10) As [Fecha],
isnull(AGSL.InvestorCashGuarantee,0) As [Efectivo]
FROM
Investors I
INNER JOIN investoraccounts IA
ON (I.InvestorId = IA.InvestorId AND IA.AccountNumber like '%01' AND
(substring(IA.AccountNumber,1,3) IN (select param from dbo.fn_ReportParams(@rptPrm_AccountNumber,','))))
LEFT JOIN AccountGuaranteeStatusLog AGSL
ON (AGSL.InvestorAccount = substring(IA.AccountNumber,1,3)
AND datediff(dd,AGSL.SettlmentDate ,@SettlmentDate)=0)
order by substring(IA.AccountNumber,1,3)
GO
如果删除SET NOCOUNT ON,并且使用相同的参数执行存储过程,则列的值会[Efectivo]
发生变化!这怎么可能?