Update Query

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]));
 
G

Guest

Try this --
UPDATE Master SET [Master].[Jobber] = [Data].[Jobber]
WHERE ((([Data]![SKU])=[Master]![SKU]));
 
G

Guest

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]));
 
G

Guest

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]));
 
J

John Vinson

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]
 
G

Guest

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]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top