Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL code problem
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Vista
Network:
Windows 2000 Server
Database:
Visual FoxPro
Divers
Thread ID:
01331489
Message ID:
01331492
Vues:
11
This message has been marked as the solution to the initial question of the thread.
First,
In VFP 8 and later you should put ALL the fields which are not involved in aggregate functions in GROUP BY clause. That is SELECT * is not good. Are you sure you need ALL fields?
Also: The first record from that quesry defines the field length, so IIF(...,..., 0) must be:
sum(IIF(stage="70",desqty,00000000000.00)) && make these zeroes to match the length you need.
In VFP9 you could use CAST() function:
sum(IIF(stage="70", desqty, CAST(0 as N(14,2))) && make these zeroes to match the length you need.
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform