Thread: QUERY
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.
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
On Tue, Mar 13, 2012 at 1:26 PM, Rory Campbell-Lange <rory@campbell-lange.net> wrote: > 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'? you are apparently unaware of my 'parse any file into any intended location' script. merlin
On 13/03/12, Merlin Moncure (mmoncure@gmail.com) wrote: > On Tue, Mar 13, 2012 at 1:26 PM, Rory Campbell-Lange > <rory@campbell-lange.net> wrote: > > On 13/03/12, anderson earley (anderson_earley@yahoo.com) wrote: ... > > 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'? > > you are apparently unaware of my 'parse any file into any intended > location' script. You have stumbled on the core concept of my new startup. Curses. -- 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
Rory Campbell-Lange wrote: > Merlin Moncure wrote: > ... >> you are apparently unaware of my 'parse any file into any intended >> location' script. > > You have stumbled on the core concept of my new startup. Curses. Curses has been around for a long time. You might want a fresher idea for your startup. :-) -- Lew Honi soit qui mal y pense. http://upload.wikimedia.org/wikipedia/commons/c/cf/Friz.jpg