I have a stored procedure with a while loop in it and I want some messages to be printed after every loops...Procedure Executed Successfully....But I want to Print Message after every Loop...
Create Procedure [dbo].[XXXX_SP]
(
@XXX DateTime,
@YYY varchar(10) )
As
Begin
Set @TotCnt=ceiling(@TotCnt)
While @Cnt= @TotCnt
Begin
Print 'File Processing Started '+Str(@Cnt)
Execute XXXXXX ()
Set @SqlQry =Select b.Zone,b.Division,a.* into from test a left join final b on a.[aaa]=b.aaa
Exec (@SqlQry)
Set @Cnt=@Cnt+1
End
End
Saranya Boopathi