So I have two different schemas namely bikeshare and spatial having two tables bs and docks respectively. Also they have two common fields on basis of which i want to apply join
This query works perfectly.
SELECT * FROM bikeshare.bs
INNER JOIN spatial.docks
ON bikeshare.bs.start_dock_code = spatial.docks.id;
Now what i want to do is to update a column neighbourhood_code in table bs which is already in the second table docks by name asumi_nr
Here what I have done so far
UPDATE bikeshare.bs SET
neighbourhood_code = spatial.docks.asumi_nr
FROM spatial.docks
WHERE bikeshare.bs.start_dock_code = spatial.docks.id;
P.S: Now the problem is This query does not give any error and it keeps on saying waiting for query to complete (left it for more than 30 min but no result). at least it should give me some error so that i may explore what i am doing wrong.
Thanking in advance for your help
EDIT: So i figured it out by reinstalling the database and the query worked fine. but still dont know what was the actual reason but if anyone else gets stuck in such situation a novice solution is to reinstall database (maybe it will work for you as well)