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,196 of 9,834    |
|    Anders Jonsson to All    |
|    Re: SetGenFiltered TCursor and movetoRec    |
|    19 Feb 07 11:27:42    |
      From: gt3TakeThisAway@bredband.net              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