Raise error is not displaying message

Hi,
  I have a script like below. Count inside the raiserror is not displaying while running the script. When I cancel the script execution, the data is showing up on the screen. Pleasde let me know what I need to do show raiseerror message while running the script.


USE rlogic;
GO
DECLARE @count varchar(100)
WHILE (SELECT COUNT(*) FROM INTERP where WordCount is null and CharCount is null and LineCount is null) > 0
BEGIN


                       
   update interp
                    set
                     WordCount = [dbo].[fnCountWords](interpretation,2),
                    CharCount = [dbo].[fnCountWords](interpretation,1),
                     LineCount = [dbo].[fnCountLines](interpretation,'<p>')
                    where interp_no in (select top 1000 interp_no from interp where WordCount is null and CharCount is null and LineCount is null order by interp_no desc)
                   
                    SET @count = (SELECT COUNT(*) FROM INTERP where WordCount is null and CharCount is null and LineCount is null)
                     RAISERROR (@count, 0, 1) WITH NOWAIT
                       WAITFOR DELAY '00:00:05'

                 
                   
END


Thank you
SthokalaAsked:
Who is Participating?
 
Aneesh RetnakaranDatabase AdministratorCommented:
Displaying the results at the client side during the execution is not completely guaranteed in all cases. I thought print or select would display the intermediate results.
0
 
Aneesh RetnakaranDatabase AdministratorCommented:
0
 
Aneesh RetnakaranDatabase AdministratorCommented:
>Count inside the raiserror is not displaying while running the script.
that's normal.
0
Cloud Class® Course: CompTIA Cloud+

The CompTIA Cloud+ Basic training course will teach you about cloud concepts and models, data storage, networking, and network infrastructure.

 
SthokalaAuthor Commented:
Thank you for your response. Table has a count of 949774. I want to display remaining count after each update. Please let me know how can I do it
0
 
Aneesh RetnakaranDatabase AdministratorCommented:
try print statement instead, or select statement and choose the option to display the results in text mode
0
 
SthokalaAuthor Commented:
tried print statement also, but it is also not showing
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.