Hey Sergey,
Thanks a lot for your input. I actually prefer doing it in separate queries but considered that I may be giving up speed by doing it that way.
With separate queries I can see the output of each, so I'm sure I get what I want. I can deal with putting in clean up code I guess.
Aloha,
James
>James,
>
>The separate sequential queries are ususlly faster. I would first use one query and only split it if its speed became an issue.
>
>>Is there a speed advantage to using separate SELECT commands as opposed to humping them up into a single command using sub queries?
>>
>>Here's an example of what I'm refering to:
>>
>>SELECT Field1,CNT(*) as nTotal FROM ATable INTO CURSOR crsCursor1 GROUP BY Field1
>>
>>SELECT nTotal FROM crsCursor1 INTO CURSOR crsCursor2
>>
>>
>>as opposed to
>>
>>
>>SELECT nTotal FROM (SELECT Field1,CNT(*) as nTotal FROM ATable GROUP BY Field1) INTO CURSOR crsCursor2
>>
>>
>>The first example is more of a pain to clean up after but is easier to debug. I'm just wondering if there is a runtime speed advantage to any of them.
>>