This content has been marked as final. Show 2 replies
In that case you need to manufacture a relation between them.1 person found this helpful
Do that by assigning a row number to each row in each table e.g. using "row_number() over (order by 1) as rn", and then joining on "rn" when updating the one table with the other.
Have a go and see how you get on.
P.S. Sorry BluShadow, I already wrote the code before you said "try it yourself" so I'm posting it anyway.
merge into t using ( select rid, varnum from ( select rowid rid, rownum rn from t ) join ( select varnum, rownum rn from output ) using (rn) ) n on (t.rowid = n.rid) when matched then update set varnum = n.varnum;
P.P.S. I use rownum instead of row_number() because the OP said "I don't care about order".