Link to home
Start Free TrialLog in
Avatar of Aiysha
AiyshaFlag for United States of America

asked on

Delete table and insert new values.

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.
ASKER CERTIFIED SOLUTION
Avatar of ste5an
ste5an
Flag of Germany 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