Link to home
Start Free TrialLog in
Avatar of Roman F
Roman FFlag for United States of America

asked on

Help with ms access query

Hi, experts.
I have a simple database.
I have two queries:
qryRec_Last---------------shows how many projects received
qryPro_Last---------------shows how many projects completed

select Count(qryRec_Last_1.projectId) AS Count FROM qryRec_Last_1
------->60
select Count(qryPro_Last_1.projectId) AS FROM qryPro_Last_1;
------->30

i want to write a query showing:
Received             Completed           %
60                        30                        50%

Thanks
SOLUTION
Avatar of Scott McDaniel (EE MVE )
Scott McDaniel (EE MVE )
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Roman F

ASKER

Thank you for the fast respond, but i did not get ... I do not have a proble with calculating the %, i can not figure out how to put them on the same line:
Received             Completed           %
60                        30                        50%
what is the name of the table where based your two queries?

post the sql of the two queries.
Avatar of Roman F

ASKER

select Count(qryRec_Last_1.projectId) AS Count FROM qryRec_Last_1
select Count(qryPro_Last_1.projectId) AS FROM qryPro_Last_1;
what is the name of the table where based your two queries?

post the sql of the two queries.  
"qryRec_Last_1"

"qryPro_Last_1"
Avatar of Roman F

ASKER

' qryPro_Last_1
SELECT
DISTINCT DataExtr.StatusCreatedByUser, DataExtr.StartStatus, DataExtr.EndStatus, DataExtr.StartDate, DataExtr.projectId, Format([StartDate],"mm/dd/yyyy") AS DatePortion
FROM DataExtr
WHERE (((DataExtr.StatusCreatedByUser) In ("GR","Cs","Jr")) AND ((DataExtr.StartStatus)="15 - Project Completion") AND ((DataExtr.EndStatus)="Invoice Approved") AND ((Format([StartDate],"mm/dd/yyyy")) Between "01/06/2014" And "01/10/2014") AND ((Format([StartDate],"yyyy"))="2014"))
ORDER BY DataExtr.StartDate, DataExtr.projectId;



'qryRec_Last_1
SELECT DataExtr.projectId, DataExtr.EndStatus, TimeValue([StartDate]) AS [Time], DataExtr.StartDate, IIf(TimeValue([StartDate])<=#12/30/1899 15:0:0#,[StartDate],DateAdd("h",12,[StartDate])) AS New, Format([StartDate],"mm/dd/yyyy") AS JustDate
FROM DataExtr
WHERE (((DataExtr.EndStatus)="06a - Implementer Verified Measures") AND ((Format([StartDate],"mm/dd/yyyy")) Between "01/02/2014" And "01/10/2014"))
ORDER BY DataExtr.projectId, DataExtr.StartDate DESC;
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Roman F

ASKER

If i copy exactly what you put, i am getting the error...
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial