Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
More than one value needed
Message
From
10/02/2006 14:33:49
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
More than one value needed
Miscellaneous
Thread ID:
01095537
Message ID:
01095537
Views:
54
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
Next
Reply
Map
View

Click here to load this message in the networking platform