Generate a dynamic sequence within a query

From: David Kerr <dmk(at)mr-paradox(dot)net>
To: pgsql-general(at)postgresql(dot)org
Subject: Generate a dynamic sequence within a query
Date: 2010-10-20 22:22:47
Message-ID: 20101020222247.GG32612@mr-paradox.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I know I've seen posts on how to do this, but i can't seem to find them.

I've got a data set

A, B
A, C
A, D
[...]

and so on

and i'd like to be able to wite a query that would result in

1,A,B
2,A,C
3,A,D
[...]

PG version is 8.3.

Any ideas?

Thanks

Dave

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Raymond O'Donnell 2010-10-20 22:28:18 Re: Generate a dynamic sequence within a query
Previous Message Joshua J. Kugler 2010-10-20 21:22:27 Re: postgre on virtual machine