update queries

D

dennis.mccarthy

I have two tables, 1st- Part Table Build, 2nd- Manual Price
Overrides. the 1st is created from a make table querie, the second
is a linked excel worksheet. I would like to update 3 fields in the
first from data in the second. They both have a common field: Part
Number.

I have create the query but am getting an error: "Operation must use
and updateable query". Here is the sql:

UPDATE [Part Table Build] INNER JOIN [Manual Price Overrides] ON [Part
Table Build].Part_Number = [Manual Price Overrides].part SET [Manual
Price Overrides].Part_Unit_Cost = [manual price overrides].
[part_unit_cost];

Thanks in advance for any help!
 
K

KARL DEWEY

Try using a left join instead of an inner join.
Also you do not want --- SET [Manual Price Overrides].Part_Unit_Cost =
[manual price overrides].[part_unit_cost];

You want something like --
SET [Part Table Build].Part_Unit_Cost = [manual price
overrides].[part_unit_cost];
 
D

dennis.mccarthy

Try using a left join instead of an inner join.
Also you do not want --- SET [Manual Price Overrides].Part_Unit_Cost =
[manual price overrides].[part_unit_cost];

You want something like --
SET [Part Table Build].Part_Unit_Cost = [manual price
overrides].[part_unit_cost];
--
KARL DEWEY
Build a little - Test a little



I have two tables, 1st- Part Table Build,  2nd- Manual Price
Overrides.   the 1st is created from a make table querie, the second
is a linked excel worksheet.   I would like to update 3 fields in the
first from data in the second.  They both have a common field: Part
Number.
I have create the query but am getting an error:  "Operation must use
and updateable query".   Here is the sql:
UPDATE [Part Table Build] INNER JOIN [Manual Price Overrides] ON [Part
Table Build].Part_Number = [Manual Price Overrides].part SET [Manual
Price Overrides].Part_Unit_Cost = [manual price overrides].
[part_unit_cost];
Thanks in advance for any help!- Hide quoted text -

- Show quoted text -

Made the corrections and am getting a new error: Cannot upddate
'(expression)'; field not updateable
 
D

dennis.mccarthy

Try using a left join instead of an inner join.
Also you do not want --- SET [Manual Price Overrides].Part_Unit_Cost =
[manual price overrides].[part_unit_cost];

You want something like --
SET [Part Table Build].Part_Unit_Cost = [manual price
overrides].[part_unit_cost];
--
KARL DEWEY
Build a little - Test a little



I have two tables, 1st- Part Table Build,  2nd- Manual Price
Overrides.   the 1st is created from a make table querie, the second
is a linked excel worksheet.   I would like to update 3 fields in the
first from data in the second.  They both have a common field: Part
Number.
I have create the query but am getting an error:  "Operation must use
and updateable query".   Here is the sql:
UPDATE [Part Table Build] INNER JOIN [Manual Price Overrides] ON [Part
Table Build].Part_Number = [Manual Price Overrides].part SET [Manual
Price Overrides].Part_Unit_Cost = [manual price overrides].
[part_unit_cost];
Thanks in advance for any help!- Hide quoted text -

- Show quoted text -

Getting a new error code: Cannot update (expression) field not
updateable.
 
K

KARL DEWEY

Did you use a left join as I suggested?
You said you wanted to update three fields. Post your complete SQL.
--
KARL DEWEY
Build a little - Test a little


Try using a left join instead of an inner join.
Also you do not want --- SET [Manual Price Overrides].Part_Unit_Cost =
[manual price overrides].[part_unit_cost];

You want something like --
SET [Part Table Build].Part_Unit_Cost = [manual price
overrides].[part_unit_cost];
--
KARL DEWEY
Build a little - Test a little



I have two tables, 1st- Part Table Build, 2nd- Manual Price
Overrides. the 1st is created from a make table querie, the second
is a linked excel worksheet. I would like to update 3 fields in the
first from data in the second. They both have a common field: Part
Number.
I have create the query but am getting an error: "Operation must use
and updateable query". Here is the sql:
UPDATE [Part Table Build] INNER JOIN [Manual Price Overrides] ON [Part
Table Build].Part_Number = [Manual Price Overrides].part SET [Manual
Price Overrides].Part_Unit_Cost = [manual price overrides].
[part_unit_cost];
Thanks in advance for any help!- Hide quoted text -

- Show quoted text -

Getting a new error code: Cannot update (expression) field not
updateable.
 

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