LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous (more recent) messageNext (less recent) messagePrevious (more recent) in topicNext (less recent) in topicPrevious (more recent) by same authorNext (less recent) by same authorPrevious page (July 2002, week 5)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Mon, 29 Jul 2002 18:42:27 +0100
Reply-To:     Peter Crawford <peter.crawford@DB.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Peter Crawford <peter.crawford@DB.COM>
Subject:      Re: select cases from Oracle database
Comments: To: "Wang, George" <gwang@OXHP.COM>
Content-type: text/plain; charset=iso-8859-1

might be better to warn that this contains **/*** untested code **/** It has an sql error... see below

Hi George suppose you have a dataset called work.wanted containing variable member, showing the member codes you want to select from oracle

%let want = " " ; proc sql noprint; select quote( trim( member )) into :want separated by ', ' from wanted ; create oracle_subset as select * from oracle_table where member_code in( &want ) ; quit;

the "create" might be better as create table oracle_subset as select * from oracle_table where member_code in( &want ) ;

apologies for multi-post !!

Datum: 29/07/2002 17:27 An: SAS-L@LISTSERV.UGA.EDU

Antwort an: "Wang, George" <gwang@OXHP.COM>

Betreff: select cases from Oracle database Nachrichtentext:

Hello,

I need select cases from an Oracle database based on member code. I have already had an SAS dataset that contains member code. The member code is TEXT formatted in both SAS dataset and Oracle database, such as A001, A002, H003,....... Each time I need about 50 to 100 members. Each member has mutiple reocrds. I can use FORMAT function to select them after I retrieve all of records from Oracle, but it both takes longer time and occupies a large space. Are there any simple ways, such as macro, to retrieve records from the Oracle? Thanks in advance for any help.

George

--

Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte Informationen. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtümlich erhalten haben, informieren Sie bitte sofort den Absender und vernichten Sie diese Mail. Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser Mail ist nicht gestattet.

This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden.


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