Fill field in one table from field in another table 
Author Message
 Fill field in one table from field in another table

01/27/1998

How can i fill all records in Customer.Name with Invoice.LastName with
SQL statment ?
Customer and Invoive are two tables.

Rami Atia.



Sat, 15 Jul 2000 03:00:00 GMT  
 Fill field in one table from field in another table

Quote:

>01/27/1998

>How can i fill all records in Customer.Name with Invoice.LastName with
>SQL statment ?
>Customer and Invoive are two tables.

>Rami Atia.

Hi Rami,

Assuming that the Customer table has an Invoice number field that will link
it to records in the Invoice table, then try this:

UPDATE Customer INNER JOIN Invoice
 ON Customer.InvoiceNum = Invoice.InvoiceNum
SET Customer.Name  = Invoice.LastName;

Hope this helps,
Tim "Woof" Gray (remove NOSPAM from email address)
Join us in the Visual Basic and Database Chat every Tuesday 9:30pm EST at:
http://msncomputing.msn.com/forums/default.asp?softwaredevelopment/ch...
or point MS Chat to server "publicchat.msn.com" and meet us in room
"SOFTWARE_DEV_TALKSHOP".



Sun, 16 Jul 2000 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Subtracting qty from a field on one table from qty used on another table

2. Help Help Need to copy a field from one table into another table

3. Create new fields in a table based off of fields in another table

4. Create new field in existing table exactly like field in second table

5. updating fields in table from field in another table

6. Program to tranfer data from a field or multiple fields in one table to a field in another table

7. Filling text boxes with fields from table

8. Filling text boxes with fields from table

9. Copying fields from one table to another

10. Combining two tables with one field in common

11. ADO: format rs!xxxxx when the field name exists in more than one table

12. Help with Listbox (Adding More Than One Field From A Access Table)

 

 
Powered by phpBB® Forum Software