ordering rows

From: Bob Pawley <rjpawley(at)shaw(dot)ca>
To: PostgreSQL <pgsql-general(at)postgresql(dot)org>
Subject: ordering rows
Date: 2007-10-18 16:31:23
Message-ID: 005901c811a4$54462110$6401a8c0@owner
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi

I have a table 'import' which is an amalgam of two other tables 'loops' and 'devices'.

The ID column of loops is reflected in the import table. However the order of rows ends up as, a for instance, 6, 8, 7, 4, 5 3, 2, 1.

I need to fetch these rows one at a time, in sequence with the loop ID, to process them in a delphi interface before going on to the next row.

Query-

1. Can I somehow ensure that the rows are transfered to the import table in numerical sequence with the ID of the loop table?

2. Is there a method of using the fetch command to ensure that rows are picked up sequentially - lowest ID to highest ID or vice-versa?

3. Is there another mehod of accomplishing this task other than fetch?

Bob Pawley

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Scott Marlowe 2007-10-18 16:36:24 Re: Crosstab Problems
Previous Message Laurent ROCHE 2007-10-18 16:28:21 Re : pg_dump - schema diff compatibility