Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL How to?
Message
From
10/01/2007 15:22:08
 
 
To
10/01/2007 15:14:33
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01184347
Message ID:
01184348
Views:
17
As far as I can see, you can not. Anyway, if you have the correct indexes, your selects will all be more or less instant.

>How can I combine the following into one SQL statement? The problem I am having is the majority of the data is coming from one table, but the criteria for each field is different.
>
>
>SELECT SUM(nloan_amount) as Total_Amt_CAP_Loans FROM loan.dbf WHERE UPPER(cstatus) = "ENROLLED" OR UPPER(cstatus) = "LOSS" OR UPPER(cstatus) = "PIF"
>
>SELECT SUM(nloan_amount) as Total_Amt_Enrolled_Loans FROM loan.dbf WHERE UPPER(cstatus) = "ENROLLED"
>
>SELECT SUM(nstate_reserve_payment) as nBDC_Reserve FROM loan.dbf WHERE UPPER(cstatus) = "ENROLLED" OR UPPER(cstatus) = "LOSS" OR UPPER(cstatus) = "PIF"
>
>SELECT SUM(nborrower_reserve_payment) + SUM(nlender_reserve_payment) as nBank_Borrower_Reserve FROM loan.dbf WHERE UPPER(cstatus) = "ENROLLED" OR UPPER(cstatus) = "LOSS" OR UPPER(cstatus) = "PIF"
>
>SELECT SUM(ytotal_claim_amount) as nClaims_Paid FROM claims.dbf
>
Previous
Reply
Map
View

Click here to load this message in the networking platform