• This is how I do it with a little bit of output. You can shorten it up by removing the RaisError output message.

    While (1=1)

    Begin

    Delete Top (10000) From

    [DimProductStyle]

    From

    [DimProductStyle] With (nolock)

    Left Join [Stp_Ods_Live]..[InvProductStyle] With (nolock)

    On [DimProductStyle].[StyleCode] = [InvProductStyle].[StyleCode]

    Where

    [InvProductStyle].[StyleCode] Is Null

    Declare @RowCountDelete integer; Set @RowCountDelete = @@RowCount

    If (@RowCountDelete > 0)

    Raiserror('%i Records Deleted',0,1,@RowCountDelete) With NoWait;

    Else

    break;

    End