I need to update a table that looks like this:
no item Location score available price some_more_text 1 water London 0,00 1 water Amsterdam 1 yes111 alpha 1 water barge 1 yes111 alpha 2 honey london 0,00 2 honey amsterdam 5 yes 5,55 omega 2 honey burgas 5 yes 5 , 55 omega 3 spoon London 4 yes 3,33 gamma 3 spoon amsterdam 4 yes 3,33 gamma 3 teaspoon burgas 4 yes 3,33 gamma 4 books london 0,00 4 books ms Urdm 1 no. 2,55 alpha 4 books burgas 1 no 2,55 alpha 5 juice london 0,00 5 juice amsterdam 5 yes 5,55 beta 5 juice burgas 5 yes 5,55 beta ...
Every item in London has nothing to do with Burgas (or Amsterdam). It can not be done manually because there are so many - but in any way I can find a way to update every item with a single number of "batch" one SQL command.
Another problem: a proprietary software, I certainly can not say which language is used - but I think it is Oracle.
You can join the table in your own updates.
update table_x lawn, table_xbarg set loan.itm = bor.itm, lon.score = bur.score, etc. where the loan None = Bur.NO and lon.location = "London" and bur.location = "Burgus";
It updates London with data from Burgas
No comments:
Post a Comment