• It is expected to delete workstations from the first table, which have the same Guid but different Id in the second table.

    The script is an extract from the bigger script. I just want to confirm what this part of the SQL is really doing.

    In the mantime I was able to analyse the execution plan and the predicate generated by the SQL, and it looks like that script is working properly, i.e. uses the where clause

    with '=' condition for Guid and <> condition for ID, even the first condition is not explicitelly stated in the source script.

    As far as an ugly formating in the posting: I apologize for that, but I still don't know how to embeded a nice formated SQL statement into the post. To make it even more confusing, the Web UI shows the post formated correctly during the posting, but the result, after posting, is unformated text.

    Thank you for your time.