日期:2014-05-17 浏览次数:20495 次
select @Sum= sum(Totalpay) from bcs_Sale;
if @strWhere <> ''
begin
exec('select @Sum=sum(Totalpay) from bcs_Sale where '+@strWhere);
end
declare @NStatement nvarchar(max)
declare @count int
set @NStatement='select @count=count(*) from ix_spc_planogram'
Exec sp_ExecuteSQL @NStatement,
N'@count int output ',
@count output
select @count