How do we ignore an error in T-SQL?
For e.g.:- The following code throw an error once the @lCounter reach at 15 and will come out. Requirement is it should go till 1000. Even if there are errors in between.
DECLARE @lCounter SMALLINT
DECLARE @lError SMALLINT
SET @lCounter = 0
WHILE (@lCounter <= 1000 )
SELECT CONVERT(VARCHAR, GETDATE(), @lCounter)
SET @lCounter = @lCounter + 1
Thanks in advance
One ounce of practice is more important than tonnes of dreams