mysql - join table and filter and take aggregrate function sql access -


is possible join 2 tables,filter data , take aggregate function in ms access? have 2 tables

inv_details:invnum,itmcde,qnt,price   inv_summary:invnum,date,total   

i need join tables , filter them date range , have sum of qnt , price order itmcde.

i tried this.

select inv.itmcde,sum(inv.qnt),sum(inv.price) (select inv_s.invnum,inv_s.date,inv_d.itmcde,inv_d.total inv_summary inv_s inner join invoice_details inv_d on inv_d.invnum =inv_s.invnum inv_s.date between  #3/4/2013# , #5/16/2013# ) inv order inv.itmcde 

but not working.

try

select d.itmcde,        sum(d.qnt) qnt,        sum(d.price) price   inv_summary s inner join inv_details d      on d.invnum = s.invnum   s.date between #3/4/2013# , #5/16/2013#   group d.itmcde  order d.itmcde 

sqlfiddle although fiddle sql server same general rules should apply in ms access


Comments

Popular posts from this blog

blackberry 10 - how to add multiple markers on the google map just by url? -

php - guestbook returning database data to flash -

delphi - Dynamic file type icon -