SQL if then statement -


retry: exec xxxxxxxxx  if @csvfilecount < 16    begin       waitfor delay '00:05:00'       goto retry    end else    begin       send email    end 

i use go retry 2 try , go send email. not sure how this. please help. thanks

can use while loop counter?

declare @counter int set @counter = 0  while @counter <= 2 begin    @counter = @counter + 1    -- code here    -- update @csvfilecount    if @csvfilecount < 16    begin        waitfor delay '00:05:00'             end    else    begin       send email       -- want break here?    end end 

Comments

Popular posts from this blog

java - pagination of xlsx file to XSSFworkbook using apache POI -

Unlimited choices in BASH case statement -

apache - How do I stop my index.php being run twice for every user -