Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Sum fields in query
Message
 
 
À
15/11/2016 04:56:36
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 9
OS:
Windows 7
Network:
Windows XP
Database:
MS SQL Server
Application:
Desktop
Divers
Thread ID:
01643456
Message ID:
01643463
Vues:
35
>Thanks my professor,
>
>Now it has problem on this line
>
>select code as acc_code,  0 as op_qty, 0 as pr_qty, sum(qty) as sl_qty, 0 as sr_qty from cashsalp  where  code like '32%' and LEN(acc_code)=7
>       GROUP BY acc_code
>
>
>Msg 8120, Level 16, State 1, Line 10
>Column 'cashsalp.code' is invalid in the select list because it is not contained in either an aggregate function or the GROUP BY clause.
>

Nick corrected the typo I overlooked, but you should be able to figure out this yourself. Why do you want others to write code for you and you don't even try to correct such simple things yourself?
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