please i need your help, i have stagging table on-Air(*BTS*,Ville,region,zone)
and table dim_BTS(*BTS*,BSC,statut,date_BTS,classe,idVille) dimAxeGeographi(idVille,ville,zmr,region)
and i need yor help how to get idVille from dimAxeGeographi
and put it on dim_BTS
by using attribute BTS
from stagging table on SSIS on Business Intelligence but i don't know how to get Id-ville
.
Assumption: in table dimAxeGeographi, ville and region together make the record unique.
Try this:
Merge dim_BTS AS Target using
(
SELECT A.BTS, D.idVille
FROM Air A
INNER JOIN dimAxeGeographi D
ON A.Ville = D.Ville AND A.Region = D. Region
) AS Source ON Source.BTS = Target.BTS
WHEN MATCHED THEN
UPDATE
SET Target.idVille = Source.idVille
;
NOTE: It would be helpful if you can post sample data and expected result.