Information générale
Catégorie:
Codage, syntaxe et commandes
>>>I use a health care app with vfp as a engine. I have a table of insurance members who have seen their pri. care
>>>physician in last 12 months . I also have a table of all the members in general . How can I extract the members
>>>who have not seen their pri. care physician. Using member number , last name , first name , expiration date fields etc.
>>
>>
>>SELECT Member.number, Member.LastName, Member.FirstName, Member.etc ;
>> FROM Member, Insurance ;
>> WHERE Member.Number NOT IN( SELECT Insurance.Number FROM Insurance );
>> INTO SomeTableOrCursor
>>
>>:0)
>
>I have tried this but it churns on it for 30 minutes and comes back with not enough disk space in /temp. I also set up a 2 giga byte
>drive as / temp and mapped it in vfp option -data section. total member count in general is 22,000 people who have seen
>pri care physician is about 14,000. Do I need a Cray supercomputer to do this?????
No, you don't need it. In fact it should be very fast. The problem is you extract from Member and Insurance. That gives 22000 multiplied by 14000 records, obviously incorrect. You must select only from Member:
SELECT Member.number, Member.LastName, Member.FirstName, Member.etc ;
FROM Member;
WHERE Member.Number NOT IN ( SELECT Insurance.Number FROM Insurance );
INTO SomeTableOrCursor
This should work pretty fast.
Vlad
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement