Date: Thu, 6 Apr 2000 09:56:56 GMT
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
Organization: Deja.com - Before you buy.
Subject: Re: row number with Proc sql / DB2
the point operator works just fine in a data step, but it is not
included in proc sql syntax.
HOWEVER... the PROC SQL NUMBER; option closely ressembles the point
operator. The Number option adds a obs# column called ROW, but only if
you output your sql results to the output window. If you specify CREATE
TABLE XX, proc sql completely forgets about the said option.
HOW COME ?
In article <firstname.lastname@example.org>,
"Lars Jacobsen" <email@example.com> wrote:
> Using the OUTOBS=x means that SAS will read every row in the DB table
> and only output x observations to the dataset (after sorting etc.)
> Instead use the INOBS= option witch functions like the OBS= dataset
> ( SET ddd(OBS=x))
> This however does not solve your problem with reading data only from a
> I'm not sure if it's usefull but POINT jumps to mind.
> Kind Regards
> Lars Jacobsen
> "pete" <remarq2NOreSPAM@p.8m.com.invalid> wrote in message
> > Hi group,
> > I need to extract a sekvential sample from a DB2-table (fetching
> > for instance records from record number 100 to 119, and nothing
> > else) to provide contents for a web-table .
> > DB2 does not possess the concept of row numbers... this is a
> > well-known fact.
> > At present, I do an outobs limit (upper limit of record number)
> > in my proc sql, and then a data step, subsetting with the _N_
> > value (lower limit of record number).
> > This work well when close to record 1, but when nearing end
> > observation, I need to fetch the whole table in to a dataset.
> > i.e... As we are using another extraction tool (SAS) we should be
> > able to cheat/enhance DB2... RIGHT ?
> > any good ideas out there ?
> > * Sent from RemarQ http://www.remarq.com The Internet's Discussion
> > The fastest and easiest way to search and participate in Usenet -
Sent via Deja.com http://www.deja.com/
Before you buy.