asked on December 1, 2014
        
I code a stored procedure reason for return count of rows from a table.
Here is my code.
USE [MTechTables]
GO
/****** Object:  StoredProcedure [dbo].[sp_PCVLimitbyAccount]    Script Date: 12/01/2014 15:01:59 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
 ALTER PROCEDURE [dbo].[sp_PCVLimitbyAccount] @AccountName nvarchar(50)
AS
 BEGIN
 Declare @myTable table
 (
 [paramApprovedDate] nvarchar(12),
 [paramLimit] float,
 [paramAddupPoint] float,
 [paramCurrentLimit] float,
 [paramTempCurrentLimit] float,
 [paramApprovedName] nvarchar(100),
 [paramPosition] nvarchar(100),
 [paramAdminAmount] float,
 [paramAccountName] nvarchar(50),
 [paramComments] nvarchar(max),
 [paramFound] nvarchar(20)
 
 ) 
 Declare @paramCount int
 Begin
 
    insert into @myTable select ApprovedDate,Limit,AddupPoint,CurrentLimit,TempCurrentLimit,ApprovedName,Position,AdminAmount,AccountName,Comments,N'มีข้อมูลแล้ว' from dbo.PCLimit where EditedDate = (select max(EditedDate) from PCLimit where AccountName = @AccountName) and AccountName = @AccountName;
    select *  from @mytable
    select @paramCount = (select count(*) from @mytable)
 End
  
 END
The issue is when I refer to @paramCount in lookup rule page(in attached file) I couldn't receive the count of row as I wish.Any way no error appeared when executed this stored procedure.
I wonder How to refer to this parameter or did I miss something?
Thank you in advance.
                                    
                                    
                                        0
                                    
                                        
                                            0