My "usual" answer would be because I know VFP a little better than SQL Server. But I do now work on using a stored procedure for this. Is this what you meant with your question?
>Why bring data in VFP if you don't have to?
>
>>
>>I have not yet done much of measurements of time comparison between one method or another. I am working on the "stored procedure" approach which - theoretically - should be the fastest. And honestly I am not much concerned about the speed of this procedure. This procedure will be done very infrequently so 10 seconds (or 1 minute) more or less won't make a difference. The reason I posted the question is to make sure that my "approach" will not impose unnecessary load on SQL Server and therefore upset a DBA.
>>
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham