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:
01331504
Vues:
13
caught by the 0000000.00 thing! the select * was just lazyness on my part but i have engine behav set at 70.
~M

>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.
>
Go raibh maith agat

~M
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform