Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

help with query

Status
Not open for further replies.

antoncrowley

Programmer
Jun 9, 2006
3
US
i want to create a query like the following off of the mas 90 data.
sorry i don't have the table descriptions in front of me so i made the table names up.
the query should be pretty self explanatory, i am pulling the order totals by month for a year with the company that ordered them.
this will be my first query off of mas 90 data so sorry for any incorrect syntax, i know the following would work on a sql server box.



select
c.company_name,
datepart(mm,o.create_dt) [month],
count(*) [number_of_orders],
sum(o.order_amount) [sum_of_orders]
from order o
left join company c
on c.id = o.company_id
and o.create_dt between '1/1/2006' and '1/1/2007'
group by
c.company_name,
datepart(mm,o.create_dt)

can someone help me translate this into a mas 90 query with the correct tablenames and sql syntax for mas 90?

thanks in advance
 
Hi.

The number of orders is from the Sales Order Module?

Also, what version of Mas are you using, and what will you be using to generate the query? Access?

Thanks,
ChaZ

There Are 10 Types Of People In The world:
Those That Understand BINARY And Those That Don’t.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top