Good morning,
I am having an issue with what I am called "stretched out strings" for some values of a variable, i.e. it looks like there is a space between each character of some observations when I tabulate the variable. Additionally, when I try to merge with another dataset on this variable, the stretched out ones do not merge but all of the non-stretched out observations do merge. However, when I view the data in the Data Editor window, they do not appear stretched out. Additionally, if I try to remove spaces using the following code, no replacements are made, so that would signify to me that there aren't actually any spaces in there.
Could someone please help me figure out how to get these values to be "normal" so that I can get them to merge with the other dataset?
Please find my dataex below. The first dataset is the one that has the stretched out observations. A few examples of the obesrvations that appear stretched out are FRF011551, FRF101282, FRF075118, FRF028750. The dataset below that is the one that I am trying to merge with. Only one observation in that dataset appears stretched out: FRF088492
I am having an issue with what I am called "stretched out strings" for some values of a variable, i.e. it looks like there is a space between each character of some observations when I tabulate the variable. Additionally, when I try to merge with another dataset on this variable, the stretched out ones do not merge but all of the non-stretched out observations do merge. However, when I view the data in the Data Editor window, they do not appear stretched out. Additionally, if I try to remove spaces using the following code, no replacements are made, so that would signify to me that there aren't actually any spaces in there.
Code:
replace Store_ID=subinstr(Store_ID, " ","",.)
Please find my dataex below. The first dataset is the one that has the stretched out observations. A few examples of the obesrvations that appear stretched out are FRF011551, FRF101282, FRF075118, FRF028750. The dataset below that is the one that I am trying to merge with. Only one observation in that dataset appears stretched out: FRF088492
Code:
* Example generated by -dataex-. For more info, type help dataex clear input str33 Store_ID "FRF011221" "FRF085623" "FRF099583" "FRF092913" "FRF051444" "FRF112025" "FRF027392" "FRF079500" "FRF088264" "FRF088848" "FRF011490" "FRF024031" "FRF115982" "FRE113229" "FRF108314" "FRF093375" "FRF088492" "FRF033299" "FRF086776" "FRF087006" "FRF093061" "FRF094473" "FRF091492" "FRF075118" "FRF094808" "FRF027757" "FRF112632" "FRF093458" "FRF113274" "FRF055965" "FRF114695" "FRF050883" "FRF011476" "FRF087700" "FRE117482" "FRF083453" "FRF095120" "FRF085100" "FRF115910" "FRF112007" "FRF011551" "FRF111479" "FRF117540" "FRF049572" "FRF110107" "FRF092094" "FRF091798" "FRE067646" "FRF074457" "FRF101282" "FRF028750" "FRF011480" "FRF085898" "FRF094546" "FRF116819" "FRE112387" "FRF054985" "FRF024521" "FRF085741" "FRF073892" "FRF012206" "FRF011829" "FRF100252" "FRF087766" "FRF095675" "FRF011105" "FRF092405" "FRF089734" "FRF110349" "FRF085591" "FRF118703" "FRF109110" end
Code:
* Example generated by -dataex-. For more info, type help dataex clear input str41 Store_ID "FRF093375" "FRF114695" "FRF086776" "FRF115910" "FRF092913" "FRF085623" "FRF011105" "FRF079500" "FRF011480" "FRF100252" "FRF051444" "FRF091798" "FRF027392" "FRF088848" "FRF055965" "FRF108314" "FRF024521" "FRF094808" "FRF087006" "FRF112007" "FRF110107" "FRF092094" "FRF028750" "FRF050883" "FRF117540" "FRF099583" "FRF101282" "FRF092405" "FRF011551" "FRF113274" "FRF085591" "FRF089734" "FRF094473" "FRF085898" "FRF073892" "FRF116819" "FRF088264" "FRF112632" "FRF049572" "FRF110349" "FRF024031" "FRF011221" "FRF091492" "FRF112025" "FRE067646" "FRF054985" "FRF011476" "FRE112387" "FRF011829" "FRF083453" "FRF095120" "FRF087766" "FRF085741" "FRF088492" "FRF087700" "FRF111479" end
Comment