Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Combine two selects together
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 9
Divers
Thread ID:
01112180
Message ID:
01112969
Vues:
17
You are welcome :o)
I hope this also do the job in network.


>Hi Borislav,
>
>In my preliminary tests new code works much faster than original. Unfortunately, I'm testing my local data. I need them to cut a new executable to test on the network
>
>Thanks a million.
>
>>Does this works (God I hate very long names :o))):
>>
>>TEXT TO lcSQLStr NOSHOW TEXTMERGE PRETEXT 7
>>    SELECT COUNT(Trans.cTrans_pk)                                    as iAccounts_Count, ;
>>           IIF(EMPTY(Trans_Employees_Queues.cCommission_Owner_UsGrLink_fk),;
>>               Trans_Employees_Queues.cUsgrlink_fk,;
>>               Trans_Employees_Queues.cCommission_Owner_UsGrLink_fk) as cUsGrlink_pk, ;
>>           SUM(Trans.yCurrent_balance_amount)                        as yCurrent_Balance_Amount ;
>>    FROM TRANS
>>    INNER JOIN Trans_employees_queues   ON Trans.cTrans_pk = Trans_employees_queues.cTrans_fk ;
>>    INNER JOIN Employee_queue_schedules ON Trans_employees_queues.cTrans_employees_queues_pk = ;
>>                                           Employee_queue_schedules.cTrans_employees_queues_fk ;
>>    WHERE <<m.lcFilter>> AND
>>          IIF(EMPTY(Trans_Employees_Queues.cCommission_Owner_UsGrLink_fk),;
>>              (Trans_employees_queues.iTemporary_Assignment_Flag = 1    AND ;
>>               Trans_employees_queues.tStart_Date <= <<m.lcDateTime>>   AND ;
>>               Trans_employees_queues.tExpire_Date >= <<m.lcDateTime>>), .t.)
>>    GROUP BY 2
>>ENDTEXT
>>
>>
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform