LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (September 2003, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Wed, 3 Sep 2003 11:37:36 -0400
Reply-To:   Susie.Li@US.SANOFI.COM
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   Susie Li <Susie.Li@US.SANOFI.COM>
Subject:   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?

proc sql; 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; quit;

Susie Li Sanofi-Synthelabo, Inc. 90 Park Ave New York, NY 10016 (212)551-4385 susie.li@us.sanofi.com

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.


Back to: Top of message | Previous page | Main SAS-L page