Link to home
Start Free TrialLog in
Avatar of Steve Eckerman
Steve Eckerman

asked on

Part Forecast Table

Hello Experts,
I have a table in Access 2003 database.  I have values in the year 2015 that I want to copy into 2016.  Can someone write me a SQL statement that can accomplish this.  Thanks!
PartForecast05292015.xls
Avatar of Steve Eckerman
Steve Eckerman

ASKER

Please see the attached table.  Thanks!
Avatar of PatHartman
User generated imageOpen the QBE to create a new query.
Select the forecast table.
Select all the columns (don't use the *)
Change the query type to Append.
Choose the forecast table to append to.  Notice that all the Append To boxes fill.
Now, we have to make two changes:
For the FiscalYear column, remove the append to value and add criteria to select the year you want to copy.
Add a final column using "2016" as the Field.  Access will name it Expr1 and choose FiscalYear in the append to.

So, this will select the rows with FiscalYear = 2015 and append the rows, changing the FiscalYear value to 2016.
I was not able to do this correctly.  Could you send me the SQL syntax that would accomplish this?  Thanks!
What error are you getting?  Please post what you have done and we'll look at it.
I got it to work but it put duplicates in my table for 2016.  Do you know of something that I can run to get rid of the duplicates in 2016?  Please advise.  Thanks!
ASKER CERTIFIED SOLUTION
Avatar of PatHartman
PatHartman
Flag of United States of America 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
Great answer!  Thanks!
You're welcome.  And a final bit of advice - make a copy of a table before running an untested batch update.