EXEC (@command)print 'ghgfhgfhgfh’insert mytable values (@aaaaa)
--print error immediately in batchdeclare @i int, @err varchar(100)--set @i=1while 0=0beginSET @err = 'Progress So Far: Step ' + convert(varchar(30),ISNULL(@i,1)) + ' completed.'raiserror (@err,0,1) with nowaitwaitfor delay '00:00:02'set @i=ISNULL(@i,1) + 1end