Re: SQL Question

From: johnnie (isg cooper) <"johnnie>
Date: 1998/06/22
Message-ID: <Pine.BSI.3.96.980622120008.10755G-100000_at_prima.netfront.net>#1/1


Moreover, the syntax only work on syabse but not ms-sql

On Mon, 22 Jun 1998, johnnie (isg cooper) wrote:

> For sybase, you can create a temp table with identity column which
> increment as row insert into the temp table. Finally, after insert your
> result set into the temp table, you can then select * from the #temptable.
>
>
> select *, id_col=identity(5)
> into #new_discounts
> from discounts
>
> select *
> from #new_discounts
> go
>
>
>
> On Sat, 20 Jun 1998, js wrote:
>
> > I am trying to figure out how to get a result set in which the row
> > 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
> >
> >
>
>
>
Received on Mon Jun 22 1998 - 00:00:00 CEST

Original text of this message