Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Visual FoxPro SQL pass-through functions
Message
 
À
30/11/1999 10:26:47
Yuri Myasnikov
Bank Menatep Spb., Chelyabinsk Dep.
Chelyabinsk, Russie
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Divers
Thread ID:
00296852
Message ID:
00296885
Vues:
21
>Hi all!
>
>Why functions SUM(amount) do not work in this request ?
>DataBase - Oracle7
>
>.....
>lnConnHandle = sqlconnect('connection', 'user','password')
>*
>IF lnConnHandle <= 0
> = MESSAGEBOX('Error',16,'Error')
>ELSE
> = MESSAGEBOX('Connection enabled', 48, 'Success')
> = SQLSETPROP(lnConnHandle, 'PacketSize', 16000)
>*
> lcSelect = "SELECT SUM(amount), doc_sys, branch_sys,pos_type, debit_id,";
> +"credit_id,cash_simbol, amount, currency, equivalent,";
> +"remarks, value_date, note, model, doc_type ";
> +"from odt_acps_archive ";
> +"where value_date = '19.11.99'"
>*
> = SQLEXEC(lnConnHandle, lcSelect, 'MyCursor')
> = SQLDISCONNECT(lnConnHandle)
>....
>
>However either as the whole request.
>Without functions SUM or other functions - all works!
>
>What can I do ?
>Thank's.
>
>Yuri.

You need to group by for SUM() to work. You are getting 1 record back, the total? also take out that amount column in your field list if you ar summing on it.

__Stephen
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform