Avatar of Aiysha
Aiysha
Flag 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.
SQL* Access

Avatar of undefined
Last Comment
ste5an

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
ste5an

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Your help has saved me hundreds of hours of internet surfing.
fblack61