Fine Tuning

Ed Kleban Ed at Kleban.com
Fri Nov 18 10:01:02 CST 2005


  
>>> Ok, Delving into SQL will be next on my study list.  I believe in a previous
>>> email I saw you comment that you cant do a search on cursor results, but
>>> rather you can build a new table if need be.  My intended approach had been
>>> to do Find extracts to VArraySets; but if if SQL provides me either with
>>> that or the ability to make interim temporary tables, either of those should
>>> be just dandy.
>> 
>> You can MIX.
>> Some task do in API, some in SQL
> 
> I intend to.
>  

Ok, I've read the SQL manual and so now know enough to be dangerous I guess.
I've also gone back and stared the Reference manual a good bit.  I think I
understand the abilities and benefits of using SQL vs native API.  What I
don't have a good understanding of is how to mix the two when it comes to
manipulation of subsets via VCursors and VSets.

Specifically, If I do an SQL query to determine a subset of records of
interest, and obtain a VCursor with say, only a RecID field, then is there a
way I can create a VSet for the corresponding table that only includes those
RecIDs made accessible via the cursor?

Conversely, if I have an ArraySet containing a subset of table records of
interest, is there are way to perform an SQL query on only that subset of
records?

I'm guessing that the solution to both of these probably involves the
creation of an temporary, intermediate table in memory or disk, that
contains only the recID fields of the records of interest.  What I'm not
sure about is the best way to create such a table from either a cursor
resulting from an SQL query, or an existing Vset.

Do I just use the Vtable constructor commands to create the table manual and
then iterate through either the Cursor or the Set manually in a loop to
populate it?  Or is there a better, more automatic way that I'm missing?

Thanks!
--Ed




More information about the Valentina mailing list