Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Optimize this SQL
Message
From
28/02/2007 11:53:47
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01199356
Message ID:
01199637
Views:
12
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform