语法没问题但是执行存储过程时候  就会报错 必须声明标量变量 "@RowCount”不知道是什么问题 

解决方案 »

  1.   

    DECLARE    @return_value int,
            @RowCount intEXEC    @return_value = [dbo].[Statistic_ServeComStNewPro_tdp]//参数少了吧
            @RowCount = @RowCount OUTPUTSELECT    @RowCount as N'@RowCount'SELECT    'Return Value' = @return_valueGO
      

  2.   


    --对不起 是用的这个执行sql存储过程DECLARE @return_value int,
    @RowCount intEXEC @return_value = [dbo].[InterDataList_pro]
    @Flag = N'1',
    @vID = N'5',
    @RowCount = @RowCount OUTPUTSELECT @RowCount as N'@RowCount'SELECT 'Return Value' = @return_valueGO
      

  3.   


    EXEC    @return_value = [dbo].[InterDataList_pro]
            @Flag = N'1',
            @vID = N'5',
            @RowCount = @RowCount OUTPUT

    你这里用输出参数形式,
    用SP_EXECUTESQL试试
      

  4.   

    --try
    USE [ZBSCompanyDB]
    GODECLARE @RowCount intEXEC  [dbo].[InterDataList_pro]
            @Flag = N'1',
            @vID = N'5',
            @RowCount = @RowCount OUTPUTSELECT    @RowCount as [RowCount]
      

  5.   

    USE [ZBSCompanyDB]
    GODECLARE @RowCount intEXEC  [dbo].[InterDataList_pro]
            @Flag = N'1',
            @vID = N'5',
            @RowCount = @RowCount OUTPUTSELECT    @RowCount as [RowCount]