El 02/03/12 19:49, John Fabiani escribió:
> On Friday, March 02, 2012 07:31:42 PM Ricardo Araoz wrote:
>> El 02/03/12 19:09, Ed Leafe escribió:
>>> On Mar 2, 2012, at 4:06 PM, Ricardo Araoz wrote:
>>>> I need to send a user defined query to the dbms and recieve more than
>>>> one result set. In fox I would send the query and recieve "cursor",
>>>> "cursor1", ..., "cursorN".
>>>> Is that possible?
>>>>
>>> I'm not sure I understand. Do you mean some sort of pagination of
>>> results? It sounds like you want to send one query and receive
>>> multiple result sets. That seems confusing to me.
>> Let's say I have a really complex and time consuming set of queries that
>> result in a temp table in the dbms. Now I want to get a couple of
>> different views of this data, say I want a subset of this result table
>> grouped and another subset in detail. So I obviously don't want to do
>> these queries twice to get both data sets.
>> I feel I'm not being clear. Bottom line, I want to send in one query two
>> or more selects and recieve from the dbms two or more result sets.
> I'm not sure what you mean and what I think I understand - I can't recall
> doing anything like that in VFP.
>
> But if I have the general idea right - I'll bring this up in hopes that it
> will help.
>
> Assume that I have executed a large SQL statement. Now I need to create
> several sub-queries based on the data I retrieved. You can do this in
> several
> ways. You could filter it - similar to what VFP did. You could execute SQL
> statement against the retrieved data.
>
>
>
> something like:
> myDataSet = bizobj.getDataSet()
> newDataSet1 = myDataSet.execute("Select somefields from dataset where pkid =
> someValue")
>
> newDataSet2 = myDataSet.execute("Select somefields from dataset where pkid =
> someOtherValue")
>
> Therefore, only one query was made on the database ( a really complex and
> time
> consuming query) and the rest was made from the retrieved data.
>
> Now you have two different datasets plus you still have the first one.
Let's say your large SQL statement has millions of rows and you want to
group those rows in one data set and you want a subset of those rows in
another data set. I'd rather recieve two datasets with 100 rows each
(and processed in the dbms) than several million rows in one dataset and
having to process it locally to obtain both final data set results.
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/[email protected]