I have a question on the scope of @@ROWCOUNT. I have a Select statement used in my Stored Procedure, which is given below. I would like to know whether it will return the desired results all the time or any possibility of showing wrong result on multi user environment.
About my requirement, the total count of the records to be returned along with the HCID field.
About my requirement, the total count of the records to be returned along with the HCID field.
Code:
SELECT @@RowCount as TotalCount,HCID FROM prod_SPBILL_SSA_Invoice_Entry WHERE Status <> 'G' and (CancelledStatus ='N' or CancelledStatus is NULL)