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 2006, week 5)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Fri, 29 Sep 2006 13:30:39 -0400
Reply-To:     Steven Raimi <steven_raimi@POLK.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Steven Raimi <steven_raimi@POLK.COM>
Subject:      Re: How to obtain obs or _N_ using SQL
Comments: To: Joh Bee <johbee@GMAIL.COM>

Total number of records in the dataset - Mark Terjeson pointed out select count('x').

Obs number for each row - if that's what you want, there's no reliable way to get it from SQL. There are functions that will imitate the obs number (search the archives for "monotonic" to find previous discussions on this topic), but SQL will not guarantee to get any dataset in the same order twice (except when you're doing an "order by", but that's applied after the records have been retrieved).

Steve Raimi R.L. Polk & Co.


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