Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
More than one value needed
Message
De
10/02/2006 14:33:49
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
More than one value needed
Divers
Thread ID:
01095537
Message ID:
01095537
Vues:
52
Hi all,

I have 3 tables : head,detail and taxes and the idea is to have the output
exactly the same my lcSql stated below :
batchno is the primary for 3 tables:

when run it in Query analyzer gave this error :
**Subquery returned more than 1 value. This is not permitted when the **subquery follows =, !=, <, <= , >, >= or when the subquery is used as an **expression."

lcSql="select a.batchno,(select sum(b.price) from detail b  ) as total, (select sum(c.taxamount) from taxes c group by c.batchno ) as Taxes,
((select sum(b.price) from detail b)+(select sum(c.taxamount) from taxes c)) as grandtotal  from header a inner join detail b on a.batchno = b.batchno "
Please assist to fix my query.

TIA
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform