Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I have a question:
I have to tables: 1. Users, 2. City. Both tables share a field called CityCode and table 2 has the name of the city. When I concatenate these tables and I preview its content (CTRL + T and right click on the table and preview), the city name and code are not asigned to the corresponding row based on the city code. See figure 1.
Fig 1 | ||||
User.Name | User.LastName | User.CityCode | City.CityCode | City.Name |
Joe | Doe | 1 | ||
Mike | Smith | 2 | ||
1 | New York | |||
2 | Buffalo | |||
Fig 2 | ||||
User.Name | User.LastName | User.CityCode | City.CityCode | City.Name |
Joe | Doe | 1 | 1 | New York |
Mike | Smith | 2 | 2 | Buffalo |
Can the concatenation lead to a result like figure 2? Or how do I do this?
Thank you,
Juan.
Hi Juan,
Rename the City.CityCode to User.CityCode and join the two tables instead of concatenating and you should get the result you're after.
Hi Juan,
Rename the City.CityCode to User.CityCode and join the two tables instead of concatenating and you should get the result you're after.
Thank you, it worked!