home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.databases.paradox      To crash or not to crash, asks Borland      9,834 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 8,197 of 9,834   
   Craig to Anders Jonsson   
   Re: SetGenFiltered TCursor and movetoRec   
   19 Feb 07 06:31:53   
   
   From: craig.futterman@nospam.comcast.net   
      
   Anders,   
   Thank you for your reply.   
   Your answer is what I needed. Two TCursors on the same table. I'll have to   
   create the index in OPAL because the table on which I will work is the   
   result of a query (To get the proper data I query two tables and use the   
   answer table. This happens at the beginning and is the only query in the   
   scenario).   
   I will work on this in the next few days (during my copious free time) and   
   see if I can do it.   
   Craig   
   "Anders Jonsson"  wrote in message   
   news:45d97c21$1@pnews.thedbcommunity.com...   
   > Craig,   
   >   
   > Not entirely sure I follow what you want to do, but you certainly don't   
   > need several copies of the table. Instead you can open several tCursor   
   > against the same table but use different indexes and ranges.   
   >   
   > If you have a secondary index that includes HospitalID, PatiendID and   
   > DateOfVisit you could do something   
   >   
   > 1) Open a tcursor against the table.   
   >   
   > 2) Open another tCursor against the same table but with the secondary   
   > index.   
   >   
   > 3) Scan the first tCursor, for each record in that one do a setRange with   
   > the secondary tcursor, using exact match for HospitalID, PatientID and a   
   > range form DateOfVisit.   
   >   
   > 4) Check out the the records in the range and see how many returning   
   > visits and add them to a temporary result table for a report.   
   >   
   >   
   > Not sure my explanation is clear enough but I hope it will point you in   
   > the right direction.   
   >   
   > I think it's essential that you create the correct secondary indexes as   
   > setRange often is MUCH quicker than setGenFilter and queries and if you   
   > have many records it will make a huge difference in performance.   
   >   
   > Anders   
   >   
   >   
   >   
   >   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca