Re: Sql loop Statement Hi shaalini,
Not quite the way to do it... if you convert the code to a stored procedure and run it, #Clone will drop itself at the completion of the stored procedure, automatically. You're trying to run it more than once as a simple script and you need to forcibly drop #Clone for additional runs |