Skip site navigation (1) Skip section navigation (2)


From: Rory Campbell-Lange <rory(at)campbell-lange(dot)net>
To: anderson earley <anderson_earley(at)yahoo(dot)com>
Cc: "pgsql-novice(at)postgresql(dot)org" <pgsql-novice(at)postgresql(dot)org>
Subject: Re: QUERY
Date: 2012-03-13 18:26:10
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-novice
On 13/03/12, anderson earley (anderson_earley(at)yahoo(dot)com) wrote:
> I need a script that parses a provided users.txt, then it needs to
> look for users in 'NEW USERS' table and move any to their 'intended'
> group.

That is not a terribly helpful description of what you want to do, as
you haven't provided many details.

Do you mean you need to run an SQL statement along the lines of:

    INSERT INTO group_users
        (person_id, group_id)
        (pid, gid);

and you want to work out how to generate that sort of statement from a
text file containing (presumably) the equivalent of 'pid' and 'gid'?


Rory Campbell-Lange

Campbell-Lange Workshop
0207 6311 555
3 Tottenham Street London W1T 2AF
Registered in England No. 04551928

In response to

  • QUERY at 2012-03-13 18:20:33 from anderson earley


  • Re: QUERY at 2012-03-13 19:52:21 from Merlin Moncure

pgsql-novice by date

Next:From: Andreas KretschmerDate: 2012-03-13 19:52:17
Subject: Re: Using pg_trgm
Previous:From: anderson earleyDate: 2012-03-13 18:20:33
Subject: QUERY

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group