I have the following problem:
I have a tablix 1 with a dataset, which has code person, name, city code.
I have another dataset2 which query dataset1 code and this brings the name of the city.
Is this possible? I clarified SQL SERVER 2008 R2 not for lookup function. Something similar?

Amira BedhiafiRank #601 · 4K reputationPosted Mar 22, 2025, 5:47 PM EDT
In SQL Server 2008 (not R2), the LOOKUP function is not available, but you can achieve similar functionality using JOIN operations in your SQL queries.
Scenario:
- Dataset1: Contains code_person, name, and city_code
- Dataset2: Contains city_code and city_name
You want to join these datasets to get the city_name for each person in Dataset1.
Solution:
You can use a JOIN to combine the datasets based on the city_code.
SELECT Dataset1.code_person, Dataset1.name, Dataset1.city_code, Dataset2.city_name FROM Dataset1 INNER JOIN Dataset2 ON Dataset1.city_code = Dataset2.city_code;