There is no sense the query you asked for, but it is possible to retrieve the info you need, just
build your query like the below one:
SELECT OrderFormNo
,ClientName
,OrderDate
,Product
,sum(Value)as Total
,InvoiceQuantity
,PendingQuantity
FROM AOM_Tbl_PendingOrders
GROUP BY OrderFormNo, ClientName,OrderDate, InvoiceQuantity, PendingQuantity, product
But remember there is no sense you get all the fields to sum. You must build a result set with some sense for example:
SELECT ClientName, OrderDate, Sum(value) as Total
FROM AOM_Tbl_PendingOrders
Group By ClientName, OrderDate
The above query is gathering All Orders made in a time stamp from customers and applying a sum on value field.
It has sense because you can count and know how much you have gain in that time for each Customer.
I know it is an old post, but I resolved to explain a little bit more why it had no sense like some folks were talking!
Regards
Best Regards,
Marcos Rosa / marcosfac@gmail.com