|Date: ||Fri, 13 Jun 2008 08:07:10 -0700|
|Sender: ||"SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>|
|Subject: ||Re: PROC SQL question|
|Content-Type: ||text/plain; charset=windows-1252|
On Jun 13, 9:34 am, karma <dorjeta...@googlemail.com> wrote:
> On 13 Jun, 15:29, clay_we...@hotmail.com wrote:
> > Anyone know if it is possible, and if so, how to select all columns of
> > a table except one? Many times I work with PHI and want to create a
> > data set consisting of a real patient ID number and a “fake” ID number
> > linked to the real one. So I create another table containing both,
> > then drop the real one, usually in a DATA step. I would like to do
> > this in SQL somehow without having to type all the column names.
> > Essentially I would like to say “SELECT * except RealID FROM TABLE…”
> > Any ideas?
> > Thanks.
> You can drop variables in sql too
> proc sql noprint;
> create table test(drop=fakeid) as
> select * from test;
Great - thanks a bunch!