• Well, not much we can do about your query since we can't see it or the DDL for the tables it is running against.

    Please take the time to read the first two articles I have referenced below in my signature block. It will show you what and how to post the information we need to actually help you with your problem.