Can anyone tell me how to count the number of records in an sql pull and store this as a variable in t sql
Printable View
Can anyone tell me how to count the number of records in an sql pull and store this as a variable in t sql
Is this what you meant?Code:Declare @RowCount int
Select * from SomeTable
Set @RowCount=@@RowCount -- @@RowCount has the number of rows processed
-- in the last SQL statement
perfect thanks