Usage of Valentina for RB
Ruslan Zasukhin
sunshine at public.kherson.ua
Fri Oct 19 07:04:35 CDT 2007
On 19/10/07 1:51 PM, "Fabian Eschrich" <info at faesch.de> wrote:
Hi Fabian,
> can you explain this errormessage to me?
> 0x42508. In the SELECT clause you can use only fields listed in the GROUP BY
> and aggregative functions.
EASY:
You cannot mix normal fields and aggregate functions in the SELECT.
Described in MOST books by SQL.
> This is my query:
>
> SELECT offers.id,
> offers.number,offers.customer_id,offers.odate,offers.paydays,offers.discount
> 1_days,offers.discount1_value,offers.discount2_days,offers.discount2_value,o
> ffers.remark,offers.created,offers.createdby,offers.changed,offers.changedby
> ,useraccounts.firstname,useraccounts.lastname,addresses.searchcode,addresses
> .customernumber,addresses.name1,addresses.name2,
>
> sum((((100-offer_items.discount_p)*(offer_items.ppu*offer_items.quantity)) /
> 100) - offer_items.discount_f) as nettosum,
> round(sum((((100-offer_items.discount_p)*(offer_items.ppu*offer_items.quanti
> ty)) / 100) - offer_items.discount_f +
> (offer_items.ppu*offer_items.quantity*offer_items.tax/100)),2) as bruttosum,
> sum(offer_items.quantity) as quantitysum
>
> FROM offers
> Left Outer Join useraccounts ON offers.createdby = useraccounts.id
> left outer join offer_items on offer_items.offerid = offers.id
> Left Outer Join addresses ON offers.customer_id = addresses.id
>
> where offers.odate >= '2007-10-01'
>
> order by offers.odate DESC
--
Best regards,
Ruslan Zasukhin
VP Engineering and New Technology
Paradigma Software, Inc
Valentina - Joining Worlds of Information
http://www.paradigmasoft.com
[I feel the need: the need for speed]
More information about the Valentina
mailing list