syntax error in update query

  • Thread starter Thread starter maxhodges
  • Start date Start date
M

maxhodges

Have I forgotten something?

I'm getting this error message when I try to run the query below:

syntax error (missing operator) in query expression
'qpassFLT_FINMET_MONTHLY.tire_costs
FROM flt inner join qpassFLT_FINMET_MONTHLY on
flt.parent_FAC_IDU = qpassFLT_FINMET_MONTHLY.FAC_IDU.'


UPDATE flt
SET flt.tire_costs = qpassFLT_FINMET_MONTHLY.tire_costs
FROM flt inner join qpassFLT_FINMET_MONTHLY on
flt.parent_FAC_IDU = qpassFLT_FINMET_MONTHLY.FAC_IDU

maxhodges
 
Have I forgotten something?

I'm getting this error message when I try to run the query below:

syntax error (missing operator) in query expression
'qpassFLT_FINMET_MONTHLY.tire_costs
FROM flt inner join qpassFLT_FINMET_MONTHLY on
flt.parent_FAC_IDU = qpassFLT_FINMET_MONTHLY.FAC_IDU.'


UPDATE flt
SET flt.tire_costs = qpassFLT_FINMET_MONTHLY.tire_costs
FROM flt inner join qpassFLT_FINMET_MONTHLY on
flt.parent_FAC_IDU = qpassFLT_FINMET_MONTHLY.FAC_IDU

Yes: you have things out of order; the JOIN clause comes before the
SET and FROM clauses:

Try

UPDATE flt INNER JOIN qpassFLT_FINMET_MONTHLY on
flt.parent_FAC_IDU = qpassFLT_FINMET_MONTHLY.FAC_IDU
SET flt.tire_costs = qpassFLT_FINMET_MONTHLY.tire_costs;

FAC_IDU must be the Primary Key of flt (or have a unique index) for
this to work.
 
Back
Top