Re: SQL Question
From: (wrong string) öß <boess_at_mail.ifw.uni-hannover.de>
Date: 1998/06/22
Message-ID: <358E101C.5909CF3D_at_mail.ifw.uni-hannover.de>#1/1
Date: 1998/06/22
Message-ID: <358E101C.5909CF3D_at_mail.ifw.uni-hannover.de>#1/1
js wrote:
> I am trying to figure out how to get a result set in which the row
Hi,if the selected rows are sorted (for example by field 'sort_field')
the following will work:
Volker Boess
> number is a column in the result set. For example, if I select n rows
>
> from a table, I need a column to contain 1 thru n. Optimally, the
> syntax needs to be ANSI standard SQL, but nearly any solution will do.
>
> Anyone have ideas?
>
> TIA
> JS
'select (select count (sort_field) +1 from table t1 where
t1.sort_field<t2.sort_field), .... from table t2 order by t2.sort_field'