Updating columns with data from a different layout

StevieV

New Member
Joined
Feb 14, 2004
Messages
24
Hi,

I have a source table with columns:
ID1 | PREFIX1 | PHONE1| TYPE1 | ID2 | PREFIX2 | PREFIX 2 | TYPE2
"1" | "001" | 555-5555 | "FAX" | "2" | "001" | "555-3434" | CAR

And a destination table with simply
ID | PREFIX | PHONE | TYPE
"1" | "001" | "222-2222" | FAX
"2" | "001" | "222-2223" | CAR


I am trying to make an update query where the destination table is updated with the records from the source table but I can't seem to figure out how to do it. I suppose I would have to use a IIF statement where if the ID is "1" then use PREFIX1 for Prefix, Phone1 for Phone and Type1 for type. If ID="2" then use Prefix2 for prefix, phone2 for phone and type2 for type?!
I'm a beginner with Access so any help would be appreciated
 

Excel Facts

Excel Wisdom
Using a mouse in Excel is the work equivalent of wearing a lanyard when you first get to college
You're needing an Append Query rather than an Update Query. You'll probably want two Append Queries, one to Append all of the records from the first part of the Source records and then another for the second part. Play around with the Append Query's graphical interface, if it doesn't make sense then post back.
 
Upvote 0

Forum statistics

Threads
1,221,672
Messages
6,161,199
Members
451,688
Latest member
Gregs44132

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top