Re: last row of table after csv import

From: e-letter <inpost(at)gmail(dot)com>
To: Josh Kupershmidt <schmiddy(at)gmail(dot)com>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: last row of table after csv import
Date: 2011-10-18 12:18:29
Message-ID: CAET1fe7btw0=zAuROUJJh0hG8UY0Cs-sP_=aWfzHyerJHPvetQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

On 18/10/2011, Josh Kupershmidt <schmiddy(at)gmail(dot)com> wrote:
> On Mon, Oct 17, 2011 at 6:06 PM, e-letter <inpost(at)gmail(dot)com> wrote:
>> After csv of data, is there a command to navigate to the last row of
>> data in the database table, after import of csv data? The csv file is
>> not sorted, so the request is to view the last row after import. Now
>> after import, the keyboard key 'z' is pressed down until the last row
>> is shown in the command terminal!
>
> Uh, what interface are you using to talk to PostgreSQL (e.g. pgAdmin,
> phpPgAdmin, psql, something else?). If the tool you're using lets you
> enter SQL queries, you should be able to enter a SELECT query with
> ORDER BY and LIMIT to get the result you need. You will have to figure
> out what you mean by "last row", i.e. what column(s) you give to ORDER
> BY.
>

No interface, using command terminal to enter sql commands.

The csv file of data is not ordered in any way, so I expect the
command '\copy' to import data into a table without changing the
relative positions of data.

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Thomas Kellerer 2011-10-18 12:34:00 Re: last row of table after csv import
Previous Message Henry Drexler 2011-10-18 11:34:00 Re: last row of table after csv import