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: save a subset of data

From   [email protected] (Brendan Halpin)
To   [email protected]
Subject   Re: st: save a subset of data
Date   Wed, 21 Mar 2012 22:18:52 +0000

On Wed, Mar 21 2012, tashi lama wrote:

> I want to list the variables and save... may be sth like this...
> list var1 var2, saving(filename)

keep var1 var2
save filename

> Also, while using odbc command, instead of using #delimit; because my
> query is too long to write in a single line, I tried using ///. /// is
> highlighted green except the first line. Unsurprisingly, when I run I
> get "unmatched quote". Can someone explain? I mean i could use #delimit;
> but I have a do file with multiple single line commands and i don't wnat
> to keep puttingt ";".

Put -#delimit ;- before the multiline commands and -#delimit cr- after:

#delimit ;
long command
  terminated by 
  a semicolon;
#delimit cr

-#delimit cr- returns Stata to the default of single-line commands.


Brendan Halpin,   Department of Sociology,   University of Limerick,   Ireland
Tel: w +353-61-213147  f +353-61-202569  h +353-61-338562;  Room F1-009 x 3147
mailto:[email protected]    ULSociology on Facebook:         twitter:@ULSociology
*   For searches and help try:

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