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 1999, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Fri, 9 Jul 1999 13:43:24 -0400
Reply-To:     Ray Pass <raypass@WORLDNET.ATT.NET>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Ray Pass <raypass@WORLDNET.ATT.NET>
Subject:      FIRST. and LAST. in PROC SQL
In-Reply-To:  <0013B5C2.C21292@westat.com>
Content-Type: text/plain; charset="us-ascii"

Well I got what I needed. A couple of respondents (John Gerlach, Erik Larsen) pointed out correctly and astutely that SQL really doesn't know or care about internal order of observations because of its truly relational nature. Nevertheless, one can "order" the obs for display using ORDER BY.

I did get a proposed method from a few of the gods (Ian and Sig) at what my friend MVS Raithel calls "SAS Mecca". The suggestion was to use MIN and/or MAX functions in PROC SQL to pick out lowest and/or highest values. I think I'll do a post-SQL PROC SORT. Seems like I lose nothing with this method, and gain good old FIRST. and LAST. vars that I know and love (besides, Ian agrees!) Thanks all.

Ray

*------------------------------------------------* | Ray Pass voice: (914) 693-5553 | | Ray Pass Consulting fax: on request | | 5 Sinclair Place | | Hartsdale, NY 10530 e-mail: raypass@att.net | *------------------------------------------------*


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