Mo

I don't know if this question was answered. As you can see 
CONSIGNMENT_CODES.CONSIGNMENT_CODE does not have aggregate function like Sum, 
Count, First, etc. Put something like SELECT 
First(CONSIGNMENT_CODES.CONSIGNMENT_CODE) ... and your query will work.

HTH

Liveson

  ----- Original Message ----- 
  From: Mo 
  To: [email protected] 
  Sent: Friday, 09 March, 2007 22:16
  Subject: [ms_access] Novice needs query critique - rcv'g error


  I made the following query:
  SELECT CONSIGNMENT_CODES.CONSIGNMENT_CODE, sum
  (INVC_DETAIL.QTY_SHIP*INVC_DETAIL.UNIT_PRICE)
  FROM INVC_DETAIL, CONSIGNMENT_CODES
  WHERE INVC_DETAIL.CNC_AUTO_KEY=CONSIGNMENT_CODES.CNC_AUTO_KEY
  GROUP BY month(INVC_DETAIL.INVOICE_DATE)
  ORDER BY INVC_DETAIL.CNC_AUTO_KEY, INVC_DETAIL.INVOICE_DATE;

  I get the following error:
  You tried to execute a query that does not include the specified 
  expression 'CONSIGNMENT_CODE' as part of an aggregate function.

  Any explanations or suggestions would be greatly appreciated.

  -Mo



   

[Non-text portions of this message have been removed]

Reply via email to