How do you write this SQL statement?

  • I have two tables (see below). Table 'csv' has the data I want to put into Table 'item'.

    How do I write the SQL statement (for Access) to update item.Manufac with the data in csv.Manufac? I've started out with something like this:

    update item

    set item.manufac = csv.Manufac

    where item.ItemNo = csv.itemNo

    <!-- Table Example -->

    csv.ItemNo csv.Manufac

    1234 1

    1235 3

    1236 4

    1237 9

    1238 3

    1239 1

    item.ItemNo item.Manufac

    1234 0

    1235 0

    1236 0

    1237 0

    1238 0

    1239 0

    Edited by - jruiseco on 01/16/2002 4:15:25 PM

  • UPDATE Item

    INNER JOIN CSV

    ON Item.ItemNo = CSV.ItemNo

    SET Item.Manufac = [csv].[Manufac];

  • Excellent.. thank you very much.

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply