First post so please let me know if I am doing anything wrong.
The problem is this: I have a table with post codes and every post code is linked to a council through a council ID. A lot of those post codes has the council ID missing so I want to make an update that fix that
I am kind of new with working with SQL as you can see on my first try with the update.
(p.council_id is null)
and (country_id = '2')
set council_id = (
p1.id = id
and p1.name = name
and rownum = 1
The problem with this I of course that every council ID is set to the first row selected in the set-select. I think the way to solve this I with PL SQL but I have no clue how.