By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,963 Members | 941 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,963 IT Pros & Developers. It's quick & easy.

Update based on lookup table

P: n/a
I have a table of mappings of various codes, tbl_Map with fields
mapID, code1 and code2

I need to write and Update command that for each row in tbl_Map
updates another table's, tbl_Codes, "code" field with code2 where it =
code1

So in the end, tbl_Codes contain codes based on the mapping rules in
tbl_Map.

I really have no clue how to write this, so any help anyone could
provide would be great!
Nov 13 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Hi there,

Here's the Query for you:

UPDATE tbl_Codes INNER JOIN tbl_Map ON tbl_Codes.code = tbl_Map.code1 SET
tbl_Codes.code = [tbl_Map].[code2];

HTH -Linda

"Juzam55" <ju*****@aol.com> wrote in message
news:75**************************@posting.google.c om...
I have a table of mappings of various codes, tbl_Map with fields
mapID, code1 and code2

I need to write and Update command that for each row in tbl_Map
updates another table's, tbl_Codes, "code" field with code2 where it =
code1

So in the end, tbl_Codes contain codes based on the mapping rules in
tbl_Map.

I really have no clue how to write this, so any help anyone could
provide would be great!

Nov 13 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.