Error 0x42508
Fabian Eschrich
info at faesch.de
Fri Oct 19 07:00:49 CDT 2007
Hi,
I am currently porting my application from mysql to valentina.
On one query I get the following error, which I don't understand:
0x42508. In the SELECT clause you can use only fields listed in the GROUP BY
and aggregative functions.
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
Can somebody explain me this errormessage or tell me, what I am doing wrong?
Thank you very much.
Mit freundlichen Grüßen / kindly regards,
Fabian Eschrich
More information about the Valentina
mailing list