How to make an update query

KWHAT

Registered User.
Local time
Yesterday, 23:22
Joined
Dec 7, 2011
Messages
19
I have a table with five fields,

| Zip code | Data 1 | Data 2 | Data 3 | Code |

The Data 1, 2, and 3 can have duplicates, so my goal is to gather all three fields and find the unique rows and assign a code to them, therefore they can reflect it to all the other row in the table

| Data 1 | Data 2 | Data 3 | Code |
| __A__ |__ B__ |__ C__ |_ C1_ |
| __A__ |__ B__ |__ C__ |_ C1_ |
| __A__ |__ B__ |______ |_ C2_ |
| __A__ |__ B__ |__ C__ |_ C1_ |
| __A__ |__ B__ |______ |_ C2_ |

What I have tired so far is I created a query which selected all unique rows for the list of tables I just dont know how to assign it a code can anyone help me? If my explanation needs more detail please let me know, Thank you!
 
hold i'll try to rephrase this

my table and its data below i have tones of records like this so there are many duplicate data for fields [data 1], [data2] and [data 3]

Zip | Data 1 | Data 2 | Data 3 | Code |
123 | __A__ |__ B__ |__ C__ |_____ |
234 | __A__ |__ B__ |__ C__ |_____ |
456 | __A__ |__ B__ |______ |_____ |
678 | __A__ |__ B__ |__ C__ |_____ |
981 | __A__ |__ B__ |______ |_____ |

my goal is to find the matching row values so i have a set of unique row from them (which i created by a query this gave me )

| Data 1 | Data 2 | Data 3 | Code |
| __A__ |__ B__ |__ C__ |_____ |
| __A__ |__ B__ |______ |_____ |

What i wanted to do with this was just enter a code value in that query so it reflects on the existing table and displays the code in all duplicate values ,

so say i enter this data in the query,( which i cannot enter for some reason )

| Data 1 | Data 2 | Data 3 | Code |
| __A__ |__ B__ |__ C__ |__C1__ |
| __A__ |__ B__ |______ |__C2__ |

i want the following output in the table


Zip | Data 1 | Data 2 | Data 3 | Code |
123 | __A__ |__ B__ |__ C__ |__C1__ |
234 | __A__ |__ B__ |__ C__ |__C1__ |
456 | __A__ |__ B__ |______ |__C2__ |
678 | __A__ |__ B__ |__ C__ |__C1__ |
981 | __A__ |__ B__ |______ |__C2__ |
 

Users who are viewing this thread

Back
Top Bottom