I couldn't get the total record count in a, in my stored proc, in a given scenario. Please help
My SP looks like this:
create proc RecordCount
@RecCnt int OUTPUT
if(CustomerID = 'ABC')
@RecCnt = select count(*) from Customers where CustomerID='ABC'
@RecCnt = select count(*) from Customers where CustomerID='XYZ' and TranDate > '05/01/2009'
-- This is how I called my SP
declare @rc int
exec RecordCount 'XYZ', @RecCnt = @rc OUTPUT
View Complete Post