Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 23
Default SQL

I written a query where i pull debtor number and and amont of sales from a
period of specified time and all works well.
It's is returning a line for every debtor transaction where i want the total
for all transaction over the year.
So 1 line for the debtor with the total transaction for the year.

SELECT dih_dbtno, dbt_name, dih_type, dih_date, dih_eom ,sum(dil_ordertotal)
from xxxxxx_xxxxxx_xxxxxxx_,xxxxxx_xxxxxxx_xxxx_xxxx,xx xxxx_xxxxxx_xxxx
where dih_link = dil_dihlink
and dih_dbtno = dbt_no
And dih_eom '14'
and dih_eom < '27'
and dih_type= '73'
Group By dih_dbtno , dbt_name, dih_type, dih_date, dih_eom




 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 11:08 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"