Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 209
  • Last Modified:

Use a function in update query

I have a table called isbnCodesTbl, in my Access 2003 database (see below).  Data is regularily imported into my webproducts table.  Webproducts has a field called isbn with a numberical value for each product. The isbn code corresponds to the isbn field in isbnCodesTbl.  I want a query to update a 2nd webproducts field called ExtText3 with the description that corresponds to the isbn code.

EG: update exttext3 with ConvertFunc([isbn])

isbn      desc
0      available, displayed
12      Duplicate SKU, not displayed
11      Has a New SKU#, not displayed
9      No longer in Inventory, not displayed
6      Out of Stock, can by reserved, display
8      Out of Stock, not displayed
7      Phone Order Only, displayed
10      Seasonal, not displayed
13      Sold by client's organization, displayed
1      Waiting for Instructions, not displayed
2      Waiting for Picture, not displayed
4      Waiting for Size, not displayed
5      Waiting for SKU, not displayed
3      Waiting for Text, not displayed
14      Waiting for Web Page, not displayed
15      Requested off website, not displayed

Thanks for any suggestions.

  • 2
1 Solution
I'm not a SQL guy and this is not the SQL area, but it would be something like this:

UPDATE WebProducts INNER JOIN isbnCodesTbl ON WebProducts.isbn = isbnCodesTbl.isbn SET WebProducts.Description = [isbnCodesTbl].[Description];

and you can also throw in:
WHERE (WebProducts.isbn) = 10)) 'or whatever

only substitute the correct field names.  Like WebProducts.Description would become WebProducts.exttext3

Featured Post

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now