Update Query

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Updating a Master price list from a Data. Made tables for both and made the
query below, but it updates my Data table from my Master Help What I'm I
missing?

UPDATE Data, Master SET Data.Jobber = [Master].[Jobber]
WHERE ((([Data]![SKU])=[Master]![SKU]));
 
Try this --
UPDATE Master SET [Master].[Jobber] = [Data].[Jobber]
WHERE ((([Data]![SKU])=[Master]![SKU]));
 
Now I get enter parameter value for Data.Jobber

KARL DEWEY said:
Try this --
UPDATE Master SET [Master].[Jobber] = [Data].[Jobber]
WHERE ((([Data]![SKU])=[Master]![SKU]));


Dave Nielsen said:
Updating a Master price list from a Data. Made tables for both and made the
query below, but it updates my Data table from my Master Help What I'm I
missing?

UPDATE Data, Master SET Data.Jobber = [Master].[Jobber]
WHERE ((([Data]![SKU])=[Master]![SKU]));
 
Ok, I joined the two field, sku. and it still updates the data table.

UPDATE Master INNER JOIN Data ON Master.SKU = Data.SKU
SET Data.Jobber = Master.Jobber
WHERE ((([Data]![SKU])=[Master]![SKU]));


Dave Nielsen said:
Now I get enter parameter value for Data.Jobber

KARL DEWEY said:
Try this --
UPDATE Master SET [Master].[Jobber] = [Data].[Jobber]
WHERE ((([Data]![SKU])=[Master]![SKU]));


Dave Nielsen said:
Updating a Master price list from a Data. Made tables for both and made the
query below, but it updates my Data table from my Master Help What I'm I
missing?

UPDATE Data, Master SET Data.Jobber = [Master].[Jobber]
WHERE ((([Data]![SKU])=[Master]![SKU]));
 
Ok, I joined the two field, sku. and it still updates the data table.

UPDATE Master INNER JOIN Data ON Master.SKU = Data.SKU
SET Data.Jobber = Master.Jobber
WHERE ((([Data]![SKU])=[Master]![SKU]));

Eh?

That's exactly and precisely what you're telling it to do:

Set the field named Data.Jobber equal to the value found in
Master.Jobber.

It's doing what you're telling it to do.

If you want to update the Master table reverse the SET clause: SET
Master.Jobber = Data.Jobber.

John W. Vinson[MVP]
 
WELL, that worked, as you can see I am new to this code stuff.

Thank you, so muck

David A.

John Vinson said:
Ok, I joined the two field, sku. and it still updates the data table.

UPDATE Master INNER JOIN Data ON Master.SKU = Data.SKU
SET Data.Jobber = Master.Jobber
WHERE ((([Data]![SKU])=[Master]![SKU]));

Eh?

That's exactly and precisely what you're telling it to do:

Set the field named Data.Jobber equal to the value found in
Master.Jobber.

It's doing what you're telling it to do.

If you want to update the Master table reverse the SET clause: SET
Master.Jobber = Data.Jobber.

John W. Vinson[MVP]
 
Back
Top