Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, is already up and running.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: reading in long string variables (yet again)

From   Steve Nakoneshny <>
To   "" <>
Subject   st: reading in long string variables (yet again)
Date   Wed, 18 Apr 2012 11:57:42 -0600

Good morning Statalisters,

Our database stores sequential followup data on patients in 20 character chunks in the format "MM/DD/YYYY {1} [1:1]" and each chunk is parsed by ";". These data are stored in a single string variable in the table, with the most recent update being appended to the right hand side. This causes a problem when importing to Stata given the 244 character limit on string variables as we are only interested in using the right-most chunk.

Is it possible to have Stata read in this string variable from the right hand side only? Or failing that, read in an ID variable (or two) as is and read in the string variable by parsing on ";"? I attempted to do this using -insheet- with the -delim(;)- option, but that applies to the whole dataset and not just a single variable.

© Copyright 1996–2016 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index