Information générale
Catégorie:
Codage, syntaxe et commandes
>>>I'm looking for advice on how I can either combine the following two select statements into one or how I can combine the result sets into one so I can use the data for a report.
>>>
>>>SELECT;
>>>udds1, udds2, name;
>>>FROM drivauth_view WHERE (ISNULL(udds1) = .f.);
>>>AND (EMPTY(udds1) = .f.);
>>>INTO CURSOR report1
>>>
>>>SELECT;
>>>udds1, udds2, name;
>>>FROM drivauth_view WHERE (ISNULL(udds2) = .f.);
>>>AND (EMPTY(udds2) = .f.)
>>>INTO CURSOR report2
>>
>>Probably this:
>>SELECT;
>>udds1, udds2, name;
>>FROM drivauth_view
>>WHERE (NOT ISNULL(udds1) AND NOT EMPTY(udds1)) ;
>>Or (NOT ISNULL(udds2) AND NOT EMPTY(udds2))
>>INTO CURSOR rpt
>
>When I run my first SQL statement, I get 10,182 records. When I run the second one I get 478 records. I tried your suggestion and got 10,182 records. Shouldn't I get 10,660?
>
>Jeff
Not in the case when the records from the second select are already selected by the first one. In your case, the result may contain maximum 10,660 records and minimum 10,182. The result may be any value between this two because a record can satisfy both initial SELECTs.
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