Hi,
I have got two tables. One with a list of cities
(table_name: City
columns: 2
col_1: id
col_2: City)
the other one with a list of names of movie theatres in several cities
(table_name: Cinemas
columns: 16
col_1: id
col_2: City
col_3...
col_16: CityID)
I'm trying to UPDATE 'Cinemas' with the 'id' from table city.
In order to delete the cities from table 'Cinemas' and join them through an "INNER JOIN" command.
My command worked well on another very similar problem (movie titles had been compared and the ID stored... no problem)
Now the exact command doesn't work anymore.
Here it is:
UPDATE Cinemas JOIN City
SET Cinemas.CityID=City.id
WHERE Cinemas.City=City.City
I also tried
SELECT * FROM Cinemas JOIN City
WHERE Cinemas.City=City.City
just to see if anything is selected. doesn't work either :-(
Nothing is selected.
I renamed the columns because I thought perhaps the problem lies there. Nope.
The tables weren't formatted the same way (Cinemas: -City _ VARCHAR(30)- City: -City _ VARCHAR(250)-) but I reformatted the Cinema table and it still does not work.
In both tables is data and the cities are named the same.
Please help. I have no ideas anymore :-(
I have got two tables. One with a list of cities
(table_name: City
columns: 2
col_1: id
col_2: City)
the other one with a list of names of movie theatres in several cities
(table_name: Cinemas
columns: 16
col_1: id
col_2: City
col_3...
col_16: CityID)
I'm trying to UPDATE 'Cinemas' with the 'id' from table city.
In order to delete the cities from table 'Cinemas' and join them through an "INNER JOIN" command.
My command worked well on another very similar problem (movie titles had been compared and the ID stored... no problem)
Now the exact command doesn't work anymore.
Here it is:
UPDATE Cinemas JOIN City
SET Cinemas.CityID=City.id
WHERE Cinemas.City=City.City
I also tried
SELECT * FROM Cinemas JOIN City
WHERE Cinemas.City=City.City
just to see if anything is selected. doesn't work either :-(
Nothing is selected.
I renamed the columns because I thought perhaps the problem lies there. Nope.
The tables weren't formatted the same way (Cinemas: -City _ VARCHAR(30)- City: -City _ VARCHAR(250)-) but I reformatted the Cinema table and it still does not work.
In both tables is data and the cities are named the same.
Please help. I have no ideas anymore :-(