bluedollar
Programmer
----------------------------------------------------------------------
I have the following tables:
CONTRACT
quote_num (joined with site_comm and progress tables)
contract_num
quote_date
po_date
invoice_date
details
SITE_COMM
site_comm_num
quote_num (joined with contract table)
date_done
done_staff_num
type_num
completed_date
completed_staff_num
client
supplier_num
PROGRESS
quote_num (joined with contract table)
p_1
p_2
p_n
----------------------------------------------------------------------
What I am trying to do?
I am trying to create a query that lists information of ALL quotes (for a relevant contract_num), This would consist of the following information:
contract.* (list all fields in CONTRACT where contract.contract_num = Form.contract_num)
sum of SITE_COMM.done_date <> NULL
sum of SITE_COMM.done_date = NULL
progress (sum of all the fields within PROGRESS that are not NULL, eg. sum of p_1, P_2, p_3....P_20 where field <> NULL)
NB. Not all the quotes have a matching SITE_COMM or PROGRESS record.
----------------------------------------------------------------------
Problems
I have treid to create the query, however when I introduce the Site_Comm and progress tables into the query, the query output is limited only to quotes that have a matching site_comm and progress record. Also I need to know how to find the sum of done_date <> NULL/done_date = NULL for all site_comm records for that relevant quote. And also the sum of p_n fields in the progress table that are Not NULL for the relevant quote.
---------------------------------------------------------------------
Any help would be greatly appreciated.
Thanks
Dan
I have the following tables:
CONTRACT
quote_num (joined with site_comm and progress tables)
contract_num
quote_date
po_date
invoice_date
details
SITE_COMM
site_comm_num
quote_num (joined with contract table)
date_done
done_staff_num
type_num
completed_date
completed_staff_num
client
supplier_num
PROGRESS
quote_num (joined with contract table)
p_1
p_2
p_n
----------------------------------------------------------------------
What I am trying to do?
I am trying to create a query that lists information of ALL quotes (for a relevant contract_num), This would consist of the following information:
contract.* (list all fields in CONTRACT where contract.contract_num = Form.contract_num)
sum of SITE_COMM.done_date <> NULL
sum of SITE_COMM.done_date = NULL
progress (sum of all the fields within PROGRESS that are not NULL, eg. sum of p_1, P_2, p_3....P_20 where field <> NULL)
NB. Not all the quotes have a matching SITE_COMM or PROGRESS record.
----------------------------------------------------------------------
Problems
I have treid to create the query, however when I introduce the Site_Comm and progress tables into the query, the query output is limited only to quotes that have a matching site_comm and progress record. Also I need to know how to find the sum of done_date <> NULL/done_date = NULL for all site_comm records for that relevant quote. And also the sum of p_n fields in the progress table that are Not NULL for the relevant quote.
---------------------------------------------------------------------
Any help would be greatly appreciated.
Thanks
Dan