Re: QUERY - Mailing list pgsql-novice

From Rory Campbell-Lange
Subject Re: QUERY
Date
Msg-id 20120313182610.GA1045@campbell-lange.net
Whole thread Raw
In response to QUERY  (anderson earley <anderson_earley@yahoo.com>)
Responses Re: QUERY
List pgsql-novice
On 13/03/12, anderson earley (anderson_earley@yahoo.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)
    VALUES
        (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

--
Rory Campbell-Lange
rory@campbell-lange.net

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

pgsql-novice by date:

Previous
From: anderson earley
Date:
Subject: QUERY
Next
From: Andreas Kretschmer
Date:
Subject: Re: Using pg_trgm