Update Query: Assign record according Letter

Hudas

Registered User.
Local time
Today, 14:20
Joined
May 13, 2013
Messages
55
Good day!!

I am hoping someone could help me out with my problem... I have two table - TABLE 1 contains letter of the alphabet and a user assigned to each letter while TABLE 2 contains company name and user assigned to each company.

What I'm hoping is if I change the user2 for letter A in table 1 all the company that starts with letter A in table 2 will have the user2 as the user assigned.

If a query is not possible then if someone could point me to the right direction it is greatly appreciated.


Thank you
Hudas
 

Attachments

  • TABLE 1.PNG
    TABLE 1.PNG
    2.7 KB · Views: 105
  • TABLE 2.PNG
    TABLE 2.PNG
    3.9 KB · Views: 99
I presume this is a simplified version of what you are trying to achieve but I would suggest the following query would do what you require

Code:
SELECT * 
FROM Table2, Table1 
WHERE left(table1.company,1)=table2.letter
 
Thank you CJ_London..

How do I exactly make this update the data in table 2?
 
why do you need to?

The 'key' is the first character of the company name, there is no need to store the user in the table. If you change the user assigned to a letter, you would then need to update the company table with the new user - potentially very messy.

Once designed, you should only view tables through queries, forms and reports
 
Now I get what you mean CJ_London.. Thank you!!
 

Users who are viewing this thread

Back
Top Bottom