| ID | Fruit | Color | Etag | Edescription |
|---|---|---|---|---|
| 1 | apple | red | A |
Invalid |
| 2 | orange | orange | B |
Invalid |
| 3 | cat | white | C | Invalid |
| 4 |
apple | red | D | Invalid |
| 5 |
apple | red | E | Invalid |
| Etag | EDescription | |||
|---|---|---|---|---|
| A |
Apple | |||
| B |
Black | |||
| C |
Color | |||
| D | Dog | |||
| E | Eat |
| ID | Fruit | Color | Etag | Edescription |
|---|---|---|---|---|
| 1 | apple | red | A |
Apple |
| 2 | orange | orange | B |
Black |
| 3 | cat | white | C |
Color |
| 4 |
apple | red | D | Dog |
| 5 |
apple | red | E | Eat |
Hi need a lil help with the sql query in access , basically table 1 is my raw data table.
table 2 is the information that contain the descriptions or lookup table for edescriptions and update table 1 edescriptions. as you table 1 edescription is invalid at first , im trying to write the query extracting from table 2 edescription and updating table 1.
so far i have this query its seeming to work for me.
UPDATE table2 RIGHT JOIN table1 ON table2 .Etag = table1 .Etag SET table1 .EDescription = table2 .EDescription
WHERE (((table1 .Etag)=([table1 ].[Etag])));
A means Apple
B means black
c means color
d means dog
e means eat
trying to pull this information from table 2 and update table 1
can someone help me

Sam HobbsRank #107 · 20.5K reputationPosted Mar 20, 2010, 12:50 PM EDT
David SmithRank #999 · 2K reputationPosted Mar 20, 2010, 1:25 PM EDT
now im doing another which is similiar you did before which is below
UPDATE table2 RIGHT JOIN table1 ON table2 .Etag = table1 .Etag SET table1 .EDescription = table2 .EDescription
WHERE (((table1 .Etag)=([table1 ].[Etag])));
but this is not working , for some reason
whats wrong with query.
look at the tables below and see what im trying to do.
the first time i was check where etag = E001
now im trying to update the whole column pulling from table 2, do you understand the logic with tables i posted?
David SmithRank #999 · 2K reputationPosted Mar 20, 2010, 5:30 PM EDT
UPDATE table2 RIGHT JOIN table1 ON table2 .Etag = table1 .Etag SET table1 .EDescription = table2 .EDescription
WHERE (((table1 .Etag)=([table1 ].[Etag])));
Sam HobbsRank #107 · 20.5K reputationPosted Mar 20, 2010, 6:31 PM EDT
WHERE (((table1 .Etag)=([table1 ].[Etag])));
See it? Where table1 = table1?
David SmithRank #999 · 2K reputationPosted Mar 20, 2010, 7:16 PM EDT
WHERE (((table1 .Etag)=([table2 ].[Etag])));
David SmithRank #999 · 2K reputationPosted Mar 20, 2010, 7:16 PM EDT
WHERE (((table1 .Etag)=([table2 ].[Etag])));
David SmithRank #999 · 2K reputationPosted Mar 21, 2010, 1:43 AM EDT
David SmithRank #999 · 2K reputationPosted Mar 21, 2010, 3:13 PM EDT
show the content in message box when application has been block
and for some reason the query work immediately ,thats weird do you know why that happen. this is the inside stuff that i dont know about, what does trust settings got to do with the sql query.
Sam HobbsRank #107 · 20.5K reputationPosted Mar 21, 2010, 4:15 PM EDT