Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Optimize this SQL
Message
De
28/02/2007 11:53:47
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01199356
Message ID:
01199637
Vues:
11
Hi Naomi,

It work's, sorry i try to group with cNomFor, the working one, now try with real data.
select c_cod_art,min(cNomFor) as cNomFor,
       SUM(CASE n_terceiro WHEN 1 THEN n_quant ELSE 0 END) as QtCli,
       SUM(CASE n_terceiro WHEN 2 THEN n_quant ELSE 0 END) as QtFor
from  #mov_enc_plano
group by c_cod_art
order by c_cod_art
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform