Hi there!
Sorry if the question has already been answered. Unfortunately, I couldn't find the solution in the other posts.
I have two data sets: one main data set (say dataset_1), which I want to do the following loop on one of the variables:
foreach x in local list_name {
replace imp_name = "`x'" if ustrregexm(imp_address, "`x'")
}
The issue I have is that I want to use the content of a variable from another dataset (say variable names in dataset_2) to create my macro, which is local list_name and it is a long list and I don't want to put all the names in my code.
Any help is appreciated.
Sorry if the question has already been answered. Unfortunately, I couldn't find the solution in the other posts.
I have two data sets: one main data set (say dataset_1), which I want to do the following loop on one of the variables:
foreach x in local list_name {
replace imp_name = "`x'" if ustrregexm(imp_address, "`x'")
}
The issue I have is that I want to use the content of a variable from another dataset (say variable names in dataset_2) to create my macro, which is local list_name and it is a long list and I don't want to put all the names in my code.
Any help is appreciated.
Comment