| Date: | Tue, 20 Jul 2004 14:47:26 -0400 |
| Reply-To: | "Richard A. DeVenezia" <radevenz@IX.NETCOM.COM> |
| Sender: | "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU> |
| From: | "Richard A. DeVenezia" <radevenz@IX.NETCOM.COM> |
| Subject: | Re: Inserting additional variables while using PassThrough |
|---|
Bill Droogendyk wrote:
> Folks:
>
> A snippet of typical code below.
>
> Note that I'm adding two new variables with a data step after the pass
> thru is complete. Is there a way to eliminate the data step and
> combine the variable additions with the pass thru step? If so, how?
>
> Please and thanks!
>
> proc sql;
> connect to oracle
> (user=me orapw=mysecret path='@tns:dssa, buffsize=5000');
>
> create view HMS as
>
> select * from connection to oracle
> (
> select k.golden,
> k.retriever,
> b.three,
> b.four
>
> from one k,
> two b
>
> where b.nine=k.nine
> );
> run;
>
> data HMS2;
> set HMS;
> op=0;
> seq_no=1;
> run;
>
Add
,0 as op, 1 as seq_no to your select statement.
As in:
...
select *, 0 as op, 1 as seq_no from connection to oracle
...
You could add the new columns in the pass-through, but that is like grabbing
a salt shaker from the other side of the dinner table when you already have
one in front of you :)
--
Richard A. DeVenezia
http://www.devenezia.com/downloads/sas/samples#hash7
|