>Select ; >Union Select Where NOT Exists Select > >How does the SQL engine perform this task? Is the selection gathered twice, or does the result set get reused? > >The reason i ask is because it would make more sense to issue several Selects and reuse the intermediate results than to phrase one SQL statement that causes several redundant selects. I'm sure one statement would be better on a back-end DB server (SQL/Oracle) but on a native VFP table, which method is optimal?
If you have SQL Server, turn on the ShowPlan, and have it tell you exactly what it is doing.
HTH
Wayne Myers, MCSD Senior Consultant Forte' Incorporated "The only things you can take to heaven are those which you give away" Author Unknown