Re: [SQL] identifying duplicates in table with redundancies

2010-09-24 Thread Tarlika Elisabeth Schmitz
Hello Oliveiros, On Fri, 24 Sep 2010 18:12:18 +0100 Oliver d'Azevedo Christina wrote: >Hey,Tarlika. >I tried to reproduce your test case through a series of inserts and >It seems that the lower case "d" went unnoticed. I can assure you people up here (in Scotland) get quite upset about it! It

Re: [SQL] identifying duplicates in table with redundancies

2010-09-24 Thread Oliver d'Azevedo Christina
Hey,Tarlika. I tried to reproduce your test case through a series of inserts and It seems that the lower case "d" went unnoticed. That explains the empty list i got as result. My fault. Sorry :-( Great to hear it helped you Best, Oliveiros Enviado de meu iPhone Em 24/09/2010, às 05:12 PM

Re: [SQL] identifying duplicates in table with redundancies

2010-09-24 Thread Tarlika Elisabeth Schmitz
Dear Oliveiros, Thank you for taking the time to help. On Fri, 24 Sep 2010 11:22:21 +0100 "Oliveiros d'Azevedo Cristina" wrote: >- Original Message - >From: "Tarlika Elisabeth Schmitz" >To: >Sent: Thursday, September 23, 2010 10:39 PM >Subject: [SQL] identifying duplicates in table wi

Re: [SQL] find and replace the string within a column

2010-09-24 Thread Leif Biberg Kristensen
On Friday 24. September 2010 13.34.12 Craig Ringer wrote: > On 24/09/2010 5:15 PM, Nicholas I wrote: > > > Example: > > table name person: > > > > name > > > > Samuel (S/o Sebastin ) > > - > > > > remove the word within the b

Re: [SQL] pgdump with insert command help

2010-09-24 Thread Guillaume Lelarge
Le 24/09/2010 14:32, Nicholas I a écrit : > hi, > > i am trying to dump a table with insert command rather tahn copy. > > pg_dump -Dt --insert table dbname > table.sql; > > i am not able to get the output. is this correct ? > > > -Nicholas I > You should put the table name right after the -t

[SQL] pgdump with insert command help

2010-09-24 Thread Nicholas I
hi, i am trying to dump a table with insert command rather tahn copy. pg_dump -Dt --insert table dbname > table.sql; i am not able to get the output. is this correct ? -Nicholas I

Re: [SQL] find and replace the string within a column

2010-09-24 Thread Craig Ringer
On 24/09/2010 5:15 PM, Nicholas I wrote: Example: table name person: name Samuel (S/o Sebastin ) - remove the word within the brackets. the output should be , Samuel. Can't you just regexp_replace, matching \([^)]+\) (i

Re: [SQL] identifying duplicates in table with redundancies

2010-09-24 Thread Oliveiros d'Azevedo Cristina
Howdy, Tarlika. First, did you past correctly your query into your mail? I am asking this because your query doesn't seem work for me, it returns an empty list :-| Your most nested query, this one, -- distinct trainer id-name select distinct on (trainer_id,trainer_name)

Re: [SQL] insert into help

2010-09-24 Thread James Kitambara
Hello Guillaume Lelarge ! I suggest you try the following question: RE-CREATE YOUR TABLES AS FOLLOW: CREATE SEQUENCE table1_id_seq   INCREMENT 1   MINVALUE 1   MAXVALUE 1000   START 1   CACHE 1; CREATE TABLE TABLE1 (     ID INTEGER NOT NULL DEFAULT nextval('table1_id_seq'::regclass)

Re: [SQL] find and replace the string within a column

2010-09-24 Thread Jayadevan M
Hello, > the below one help's me to find the data within the two brackets. > > SELECT name,(REGEXP_MATCHES(name, E'\\(.+?\\)'))[1] from person; > regexp_matches > > (S/o Sebastin ) > - > Trying to work with your code - upda

[SQL] find and replace the string within a column

2010-09-24 Thread Nicholas I
Hi, the data in my table, have a substring enclosed in parenthesis, 1. i want to replace the string with the brackets to null or any other value. 2. remove the contents within brackets. Example: table name person: name Samuel (S/o Sebastin )