I am using levelsof to feed a list of ISO-3 country codes into wbopendata to query countries' GDP from the World Bank. wbopendata requires that the list of countries to be queried is in this format:
levelsof gives me an output like this:
I use subinstr() to remove the quotes:
I receive the following result:
which is not what I want. Am I having this issue because of all the compound quotes? I believe I am specifying correctly but clearly that is not the case.
Code:
"ABW;AFG;ALB;ANT"
Code:
`"ABW"';`"AFG"';`"ALB"';`"ANT"'
Code:
local countries = `"`"ABW"';`"AFG"';`"ALB"';`"ANT"'"' di `"`countries'"' local countries = subinstr(`"`countries'"', `"""', "", .) di `"`countries'"'
Code:
. local countries = `"`"ABW"';`"AFG"';`"ALB"';`"ANT"'"' . di `"`countries'"' `"ABW"';`"AFG"';`"ALB"';`"ANT"' . local countries = subinstr(`"`countries'"', `"""', "", .) . di `"`countries'"' ;;;
Comment