melaniecarr23
Programmer
My append query is not working all the time:
INSERT INTO plan_calculations ( plan_wks, plan_id )
SELECT DateDiff("ww",[start_date],[end_date]) AS plan_wks, plans.plan_id
FROM today, plans INNER JOIN plan_calculations ON plans.plan_id = plan_calculations.plan_id
WHERE (((plans.plan_id)=[plan_to_calculate]) AND ((today.date_id)=1));
Details: I have 3 tables I'm working from right now.
table plans (data is entered into from a form)
table plan_calculations (queries append/update information to fill this table with values)
table today (includes only 1 record for the current date, month, and record to be updated (user input changes this)
When I try to run the queries for a record already entered in the plan_calculations table, it works fine. It has one row of information to append or update depending on the query.
However, when I try to run the queries for a record existing in the plans and today tables but not yet in the plan_calculations table, 0 rows are returned.
Can someone please tell me why this is happening?
Thanks!
INSERT INTO plan_calculations ( plan_wks, plan_id )
SELECT DateDiff("ww",[start_date],[end_date]) AS plan_wks, plans.plan_id
FROM today, plans INNER JOIN plan_calculations ON plans.plan_id = plan_calculations.plan_id
WHERE (((plans.plan_id)=[plan_to_calculate]) AND ((today.date_id)=1));
Details: I have 3 tables I'm working from right now.
table plans (data is entered into from a form)
table plan_calculations (queries append/update information to fill this table with values)
table today (includes only 1 record for the current date, month, and record to be updated (user input changes this)
When I try to run the queries for a record already entered in the plan_calculations table, it works fine. It has one row of information to append or update depending on the query.
However, when I try to run the queries for a record existing in the plans and today tables but not yet in the plan_calculations table, 0 rows are returned.
Can someone please tell me why this is happening?
Thanks!