Hello everyone,
I have a following table:
and a command:
I trying to match Objekt if it contains Material and display that Material
Jet the command does not produce any results. Could anyone please help me to get on the right track.
Sincerely,
Pavlo
I have a following table:
| Material | Objekt |
| 0001 | |
| 0002 | |
| 0003 | |
| _uht9_0001 | |
| __lpo870003 |
gen Material_match = ""
foreach i in Objekt{
foreach j in Material {
replace Material_match = "`j'" if strpos(Objekt, "`j'") > 0
}
}
foreach i in Objekt{
foreach j in Material {
replace Material_match = "`j'" if strpos(Objekt, "`j'") > 0
}
}
| Material | Objekt | Material_match |
| 0001 | ||
| 0002 | ||
| 0003 | ||
| _uht9_0001 | 0001 | |
| __lpo870003 | 0003 |
Sincerely,
Pavlo

Comment