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 (May 2001, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Wed, 2 May 2001 14:18:11 EDT
Reply-To:     nnair@acf.dhhs.gov
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Neal K Nair <nnair@ACF.DHHS.GOV>
Subject:      Re: SQL Statement in SAS
Comments: To: Darran Zenger <DZENGER@KLUNE.COM>

Could you try the SUBSTR to pick up the first three characters and equate them to 'PUR'

Neal ---------- Original Text ----------

From: "Darran Zenger" <DZENGER@KLUNE.COM>, on 5/2/01 2:12 PM: To: SMTP@Public.11@ACF.WDC[<SAS-L@LISTSERV.UGA.EDU>]

Hello everyone-

I'm wanting to find a SQL statement for the WHERE clause. What I need to find is a string of character in a variable that begins with the three letters 'PUR'. I have a variable that is used for transaction types such as PUR-INS PUR-MTL ADJ-STK, etc. I need to find a way in the where clause that will select only those which begin with "PUR" and eliminate all others. I've tried some standard SQL coding but as I understood it, that doesn't always work within SAS so wanted to see what would work in PROC SQL.

Thanks. Darran

Darran Zenger The SAS System Programming Klune Industries, INC Spanish Fork, UT


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