Delete table and insert new values.

Aiysha
Aiysha used Ask the Experts™
on
How can I make access query to delete all data from a table and then insert new data. I want to do this in the one query.

DELETE FROM FORECAST
INSERT INTO FORECAST ( PROPNUM, RE_ENG_TAG, WELL_NAME, OUTDATE, [Gross Oil], [Gross Gas], [Gross Water] )
SELECT ariesadmin_AC_MONTHLY.PROPNUM, ariesadmin_AC_PROPERTY.RE_ENG_TAG, ariesadmin_AC_PROPERTY.WELL_NAME, ariesadmin_AC_MONTHLY.OUTDATE, ariesadmin_AC_MONTHLY.S370, ariesadmin_AC_MONTHLY.S371, ariesadmin_AC_MONTHLY.S376
FROM ariesadmin_AC_MONTHLY RIGHT JOIN ariesadmin_AC_PROPERTY ON ariesadmin_AC_MONTHLY.PROPNUM = ariesadmin_AC_PROPERTY.PROPNUM;

Thank you.
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Senior Developer
Commented:
This is not possible in Access. You need two separate queries.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial