David Smith

David Smith

  • NA
  • 2k
  • 0

c# ms access sql query in access

Mar 20 2010 3:21 PM
Table1
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




Table2



Etag EDescription



A
Apple



B
Black



C
Color



D Dog



E Eat








Table1    END RESULT
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

Answers (9)