I have tried simple print statements and it works.
Eg:
DECLARE @CheckCnt int
SELECT @CheckCnt=COUNT(*) FROM Table1
print @CheckCnt
This prints the count.
Now if I try this it doesn't print at all.
Eg:
DECLARE @Record_Identifier char(1)
DECLARE Cursor1 CURSOR FOR
SELECT Record_Identifier FROM Table1
OPEN Cursor1
WHILE @@FETCH_STATUS = 0
BEGIN
FETCH NEXT FROM Cursor1
INTO @Record_Identifier
PRINT @Record_Identifier
END
CLOSE Cursor1
DEALLOCATE Cursor1
Eg:
DECLARE @CheckCnt int
SELECT @CheckCnt=COUNT(*) FROM Table1
print @CheckCnt
This prints the count.
Now if I try this it doesn't print at all.
Eg:
DECLARE @Record_Identifier char(1)
DECLARE Cursor1 CURSOR FOR
SELECT Record_Identifier FROM Table1
OPEN Cursor1
WHILE @@FETCH_STATUS = 0
BEGIN
FETCH NEXT FROM Cursor1
INTO @Record_Identifier
PRINT @Record_Identifier
END
CLOSE Cursor1
DEALLOCATE Cursor1