• I have the exec commented out in my example. It produces a query that has an accurate where clause without all the other extraneous stuff. All you have to do to get it to run is uncomment out the exec and change it to match your structure.