Update Table for Obsolescence

  • Thread starter Thread starter Steve
  • Start date Start date
S

Steve

I am missing something or have a blind spot about how to do this

I have a table (TblAll Products) with all my products in it including
a yes/no field to determine if a product is obsolete or not.

I have used this years list of all existing products
(TblCurrentProducts) to create a query (qryObsoleteProducts) showing
any non matched items ie which are in TblAllProducts but not in
TblCurrentProducts and are therefore obsolete.

I tried to create an Update query from qryObsoleteProducts to set the
yes/no flag in TblAllProducts to Yes but am getting an error:
Operation must use an updatable query.

Where I am going wrong
TIA
Steve
 
Where I am going wrong

No way to tell unless you tell us where you're going... please post the SQL of
the query. Also indicate the Primary Key of each table (if that's not part of
the join it may be a cause of the non-updatability).

John W. Vinson [MVP]
 
On Fri, 28 Dec 2007 17:29:26 -0800 (PST), Steve

What John said, but you most likely also have a database design
problem. In most cases it would be MUCH better to have tblProducts
with a Status field indicating Active or Obsolete, rather than two
tables.
Relational databases are not souped-up spreadsheets.

-Tom.
 
Hi Steve

I assume that you are using "Find unmatched query Wizard"
Try running the (qryObsoleteProducts) as a "Make-Table Query"
This should create a new table of obsolete products.

Have Fun
DeltaTech
 
On Fri, 28 Dec 2007 17:29:26 -0800 (PST), Steve


What John said, but you most likely also have a database design
problem. In most cases it would be MUCH better to have tblProducts
with a Status field indicating Active or Obsolete, rather than two
tables.
Relational databases are not souped-up spreadsheets.

-Tom.








- Show quoted text -

Thats exactly what I am trying to achieve. I have no control over the
new products and am trying to use the downloaded file contaiing these
to mark as obsolete the items in the main table that arent produced
any more
 
I am missing something or have a blind spot about how to do this

I have a table (TblAll Products) with all my products in it including
a yes/no field to determine if a product is obsolete or not.

I have used this years list of all existing products
(TblCurrentProducts) to create a query (qryObsoleteProducts) showing
any non matched items ie which are in TblAllProducts but not in
TblCurrentProducts and are therefore obsolete.

I tried to create an Update query from qryObsoleteProducts to set the
yes/no flag in TblAllProducts to Yes but am getting an error:
Operation must use an updatable query.

Where I am going wrong
TIA
Steve

UPDATE tblAllProducts LEFT JOIN tblCurrentProducts
ON tblCurrentProducts.ProductID = tblAllProducts.ProductID
SET Obsolete = True
WHERE tblCurrentProducts.ProductID IS NULL;

Works only if there is a unique Index (such as a Primary Key) on ProductID in
tblAllProducts.

John W. Vinson [MVP]
 
On additional occasions, parties in a transactions may try to modify their declare on line which do not personage either have to reveal the state of the ending.Both state contracts may also digest gag orders to foreclose highly set employees from disclosing aoc gold[/url:nwqns9dm] swop secrets or apart clubby publication, decide for abundant aliveness after the (http://www.ugamegold.com/age-of-conan-gold/:nwqns9dm)ement has ceased.
 

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

Back
Top