Date: Wed, 3 Sep 2003 15:24:58 -0400
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Susie Li <Susie.Li@US.SANOFI.COM>
Subject: Again - Rudimentary SQL Question
Content-Type: text/plain; charset=us-ascii
In the following complex query, I'm finding in the Oracle table "BASE_FACT"
all those products stored in a SAS dataset "mkt".
My problem is that I want to create a new table "PRODUCT" containing not
only those columns in the Oracle table (in large cap), but also those in
the SAS dataset (in small cap) once matched. How should I write my
statement to include those SAS variables?
connect to ORACLE as T(USER=XXX PASSWORD=XXXXX PATH="NNNN");
create table PRODUCT as select * from connection to T
(select * from BASE_FACT)
where PROD_ASN in (select product_id from mkt);
disconnect from T;
90 Park Ave
New York, NY 10016
Important: The Information in this e-mail belongs to Sanofi-Synthelabo Inc.,
is intended for the use of the individual or entity to which it is addressed,
and may contain information that is privileged, confidential, or exempt from
disclosure under applicable law. If you are not the intended recipient, you
are hereby notified that any disclosure, copying, distribution, or use of, or
reliance on, the contents of this e-mail is prohibited. If you have received
this e-mail in error, please notify us immediately by replying back to the
sending e-mail address, and delete this e-mail message from your computer.