• I don't recommend this approach, but you can structure a WHILE loop to act as a DO...UNTIL loop.

    WHILE (1 = 1)

    BEGIN

    --do stuff

    .....

    -- do more stuff

    if (break_condition = true)

    BREAK

    END

    That said - from what you're describing you'd be better off bulk loading to some staging table, and doing your validation there before moving it to the permanent home.....

    ----------------------------------------------------------------------------------
    Your lack of planning does not constitute an emergency on my part...unless you're my manager...or a director and above...or a really loud-spoken end-user..All right - what was my emergency again?