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 |
*------------------------------------------------*
|