Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Optimize this SQL
Message
 
 
À
28/02/2007 10:55:18
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01199356
Message ID:
01199570
Vues:
25
>Hi Naomi,
>
>Yes, his answer is to the wrong person, this thread was started by me. :)
>
>But the problem is, I want to optimize the query in my first post, because i need the other fields for display purposes, if i group only by c_cod_art, it's working with one row, but i need the name of the suplier, and it creates a row with QtFor with the suplier NAME (cNomFor) and other with qtCli with no name.
>
>i need to display this in Form
>QtCli=Quantity Client needs
>qtFor=Quantity Orders in suplier
>
>c_cod_art....Suplier Name....... qtCli....qtFor
>AAAAA        Joao                 10        15
>BBBBB        carlos               20        50
>CCCCC        joao                100       200
>
>
>João Batista

As I suggested, try to add MAX(cNomFor) as Supplier in your original SQL if always one record has data and another doesn't.
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform