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, statalist.org is already up and running.


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

Re: st: save a subset of data


From   brendan.halpin@ul.ie (Brendan Halpin)
To   statalist@hsphsun2.harvard.edu
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.

Regards,

Brendan
-- 
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:brendan.halpin@ul.ie    ULSociology on Facebook: http://on.fb.me/fjIK9t
http://teaching.sociology.ul.ie/bhalpin/wordpress         twitter:@ULSociology
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


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