Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at

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

Re: st: CSV file with variable types

From   Nick Cox <>
Subject   Re: st: CSV file with variable types
Date   Wed, 4 May 2011 23:45:22 +0100

Stata can't read strings longer than 244 characters into variables.

What's happening, as I wrote in answer to one of your previous
questions, is indeed that Stata is peeking at the early part of the
data. If it read all the way to the end to work out what it had to do
before it actually did it, it would be even slower.

This is just another example of how -insheet-, although I've found
that it works well for many files smaller and simpler than yours, is
not up to scratch for what you want.

It's not true that -infile- requires those separators. You can read in
other files too.

Either way, your 600 character strings can't be read into Stata
without previous surgery.
That's the main crunch.


On Wed, May 4, 2011 at 11:31 PM, Argyn Kuketayev
<> wrote:
> Hello
> I have a pipe-delimited text file. A few variables in the file have
> length of 600 characters. Unfortunately, if I use -insheet- it sets
> the variable type to str150, I suppose because first few values were
> short. -infile- command seems to require tab or comma separated files.
> I need to read this file into Stata. Any ideas?
*   For searches and help try:

© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index