I'm getting this error and I've done searches on it. I don't have:
- any memo fields in the tables queried
- DISTINCT in any of the queries
I do have a double data type in 1 of the tables queried (don't know if this is the culprit)
There are 3 queries involved
assoc_daily_prod_time_qry
Code:
SELECT tl.assoc_id, tl.log_date, Format((DateDiff('n',Time_In,Time_out)-((DateDiff('n',Nz(break_out_1,0),Nz(break_in_1,0))-DateDiff('n',Nz(break_out_2,0),Nz(break_in_2,0))))-Nz(qty_of_prod,0))/60,'##.00') AS prod_hours, DateDiff('n',Time_In,Time_out)-((DateDiff('n',Nz(break_out_1,0),Nz(break_in_1,0))-DateDiff('n',Nz(break_out_2,0),Nz(break_in_2,0))))-Nz(qty_of_prod,0) AS prod_mins
FROM (time_logs AS tl LEFT JOIN (SELECT * FROM assoc_prod WHERE code_id = 'WO') AS ap ON (tl.assoc_id = ap.assoc_id) AND (tl.log_date = ap.ap_date)) INNER JOIN qp_assocs AS a ON tl.assoc_id = a.assoc_id;
assoc_daily_earned_prod_qry
Code:
SELECT assoc_id, ap_date, Format(Sum(60/uph*qty_of_prod),'##.00') AS earned_prod
FROM assoc_prod AS ap INNER JOIN prod_codes AS pc ON ap.code_id = pc.code_id
WHERE (((ap.code_id)<>'WO'))
GROUP BY ap_date, assoc_id;
Query1
Code:
SELECT * FROM assoc_daily_prod_time_qry AS adpt INNER JOIN assoc_daily_earned_prod_qry AS adep ON (adpt.assoc_id = adep.assoc_id) AND (adpt.log_date = adep.ap_date);
The first 2 run fine, the 3rd one gives me the error. Anyone know why?