jamesk1979
IS-IT--Management
Hi all,
Is it possible to update multiple rows in a table with a value from a single row?
I have a table like so...
ID Field Value PlanB
39 Sys 1
40 PlanA 0001
41 MaintDate 2005138
42 MaintUser Abcde123
43 Sys 1
44 PlanA 0002
45 MaintDate 2005138
46 MaintUser Abcde123
I want to copy the "0001" value in the row 40 PlanA field into all rows in the PlanB column where the ID is between 39 and 42.
And copy the "0002" value in the row 44 PlanA field into all rows in the PlanB column where the ID is between 43 and 46, etc.
Leaving me with something like this;
ID Field Value PlanB
39 Sys 1 0001
40 PlanA 0001 0001
41 MaintDate 2005138 0001
42 MaintUser Abcde123 0001
43 Sys 1 0002
44 PlanA 0002 0002
45 MaintDate 2005138 0002
46 MaintUser Abcde123 0002
Is this possible using an update query?
Apologies is this has been covered before, I tend to build all my queries using the Design View and can't usually follows the Jet SQL that seems a lot more powerful.
Thanks,
james.
Is it possible to update multiple rows in a table with a value from a single row?
I have a table like so...
ID Field Value PlanB
39 Sys 1
40 PlanA 0001
41 MaintDate 2005138
42 MaintUser Abcde123
43 Sys 1
44 PlanA 0002
45 MaintDate 2005138
46 MaintUser Abcde123
I want to copy the "0001" value in the row 40 PlanA field into all rows in the PlanB column where the ID is between 39 and 42.
And copy the "0002" value in the row 44 PlanA field into all rows in the PlanB column where the ID is between 43 and 46, etc.
Leaving me with something like this;
ID Field Value PlanB
39 Sys 1 0001
40 PlanA 0001 0001
41 MaintDate 2005138 0001
42 MaintUser Abcde123 0001
43 Sys 1 0002
44 PlanA 0002 0002
45 MaintDate 2005138 0002
46 MaintUser Abcde123 0002
Is this possible using an update query?
Apologies is this has been covered before, I tend to build all my queries using the Design View and can't usually follows the Jet SQL that seems a lot more powerful.
Thanks,
james.