Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Make Select quicker
Message
De
26/01/2006 09:34:39
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Make Select quicker
Versions des environnements
Visual FoxPro:
VFP 6 SP5
OS:
Windows 2000 SP4
Database:
Visual FoxPro
Divers
Thread ID:
01090482
Message ID:
01090482
Vues:
61
Hi All,

does anyone know of a way to make this select statement quicker?
SELECT lnPayRecID AS pay_rec_id,;
  ldStartDate AS st_dte, ldEndDate AS end_dte,;
  service_id, cst_frml, cst_coef, ano_frml, ano_coef,;
  adj_frml, adj_coef, cpi_frml, COUNT(*) AS srv_days,;
  SUM(IIF(EMPTY(date_calc),0,1)) AS calc_days,;
  SUM(IIF(EMPTY(date_calc),0.00,NVL(contract_base,0.00))) AS cntr_base ,;
  SUM(IIF(EMPTY(date_calc),0.00,NVL(contract_anomaly,0.00))) AS cntr_ano,;
  SUM(IIF(EMPTY(date_calc),0.00,NVL(contract_adjustment,0.00))) AS cntr_adj,;
  SUM(IIF(EMPTY(date_calc),0.00,NVL(contract_total,0.00))) AS cntr_total,;
  SUM(IIF(EMPTY(date_appr),0,1)) AS appr_days,;
  SUM(IIF(EMPTY(date_appr),0.00,NVL(appr_final,0.00))) AS cntr_appr ;
  FROM cutemp;
  GROUP BY service_id,cst_frml,cst_coef,ano_frml, ano_coef, adj_frml, ;
  adj_coef, cpi_frml ;
  INTO CURSOR new_t
Thanks,
Beth
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform