Rabu, 21 September 2016

[MS_AccessPros] Update Multiple Values in one query

 

Hello all,


I have a table that has address fields. There are two sets of addresses which are Home and Mailing. Sort of like a business and a home address.


Because there are nulls in one the sets of addresses I want to put the values from the Home addresses into the Mailing address fields if the Mailing address fields are null.


Right now I have the following sql and it works but if I add the other fields nothing happens.


How do I write the query to update all of the fields in one query?


here are the fields

Home Addr1 Ld

Home Addr2 Ld

Home Addr3 Ld

Home Addr4 Ld

Home City Nm

Home Postal Cd

Home State Cd

Mail Addr1 Ld

Mail Addr2 Ld

Mail Addr3 Ld

Mail Addr4 Ld

Mail City Nm

Mail Postal Cd

Mail  State Cd



UPDATE tblEmployeeAddresses SET tblEmployeeAddresses.[Mail Addr1 Ld] = [Home Addr1 Ld]
WHERE (((tblEmployeeAddresses.[Mail Addr1 Ld])="-"));



Thank You

Jim Wagner



__._,_.___

Posted by: luvmymelody@yahoo.com
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (1)

Have you tried the highest rated email app?
With 4.5 stars in iTunes, the Yahoo Mail app is the highest rated email app on the market. What are you waiting for? Now you can access all your inboxes (Gmail, Outlook, AOL and more) in one place. Never delete an email again with 1000GB of free cloud storage.


.

__,_._,___

Tidak ada komentar:

Posting Komentar