Hi I would like to update a table with the info from another table ie.
table one.
style status
------- ----------
1 design
2 design
3 buy
4 buy
table two
style colour status
-------- -------- --------
1 blue
1 black
1 green
2 blue
3 red
3 green
what I want is to be able to update table 2 with the statuses from table 1 depending that the style number is equal
but this does not seem to work.
I am running this on a AS400/iSeries
thanks for your help in advance
table one.
style status
------- ----------
1 design
2 design
3 buy
4 buy
table two
style colour status
-------- -------- --------
1 blue
1 black
1 green
2 blue
3 red
3 green
what I want is to be able to update table 2 with the statuses from table 1 depending that the style number is equal
Code:
UPDATE one A JOIN two B ON
A.style= B.style
SET A.status= B.status
but this does not seem to work.
I am running this on a AS400/iSeries
thanks for your help in advance