Re: [SQL] data import via COPY, Rules + Triggers

2011-05-07 Thread Tarlika Elisabeth Schmitz
On Wed, 4 May 2011 23:48:04 +0100 Tarlika Elisabeth Schmitz wrote: >I have got a database that needs to be populated, first with historical >data, then on a daily basis.[...] >Once imported, data will neither be modified nor deleted. > >Data come in denormalized CSV formats. [...] >I created inte

Re: [SQL] data import via COPY, Rules + Triggers

2011-05-07 Thread Tarlika Elisabeth Schmitz
Thank your for your reply, Sergey. (By the way, I noticed you are not cc'ing/replying to the list.) On Fri, 6 May 2011 01:45:19 +0300 sergey kapustin wrote: >INSERT ... RETURNING will not work in rules i think. You cannot nest >INSERTs and its not possible to use variables. And rules are not ac

Re: [SQL] data import via COPY, Rules + Triggers

2011-05-05 Thread Tarlika Elisabeth Schmitz
Thank you for your help, Sergey. That certainly works. I was wondering whether the manager.id could maybe be obtained via INSERT ... RETURNING? -- Best Regards, Tarlika Elisabeth Schmitz On Thu, 5 May 2011 08:45:32 +0300 sergey kapustin wrote: >Try using (select id from manager where name

[SQL] data import via COPY, Rules + Triggers

2011-05-04 Thread Tarlika Elisabeth Schmitz
I have got a database that needs to be populated, first with historical data, then on a daily basis. Number of entities is small, data volume huge. Once imported, data will neither be modified nor deleted. Data come in denormalized CSV formats. There are overlaps between different CSV formats and

Re: [SQL] data import: 12-hour time w/o AM/PM

2011-02-08 Thread Tarlika Elisabeth Schmitz
On Tue, 8 Feb 2011 18:38:44 - "Oliveiros d'Azevedo Cristina" wrote: >- Original Message - >From: "Tarlika Elisabeth Schmitz" >To: >Sent: Tuesday, February 08, 2011 6:14 PM >Subject: [SQL] data import: 12-hour time w/o AM/PM > > >I

Re: [SQL] data import: 12-hour time w/o AM/PM

2011-02-08 Thread Tarlika Elisabeth Schmitz
On Wed, 9 Feb 2011 08:21:47 +1300 Andrej wrote: >On 9 February 2011 07:14, Tarlika Elisabeth Schmitz > wrote: >> From the date and time I want to create a timestamp. >> I know that >> - the events take place during the day, say between 10:30 and 22:30 >> - it's always a set of events at one locat

Re: [SQL] data import: 12-hour time w/o AM/PM

2011-02-08 Thread Andrej
On 9 February 2011 07:14, Tarlika Elisabeth Schmitz wrote: > From the date and time I want to create a timestamp. > I know that > - the events take place during the day, say between 10:30 and 22:30 > - it's always a set of events at one location spaced about 30min apart > - the imported data are c

Re: [SQL] data import: 12-hour time w/o AM/PM

2011-02-08 Thread Leif Biberg Kristensen
On Tuesday 8. February 2011 19.14.00 Tarlika Elisabeth Schmitz wrote: > From the date and time I want to create a timestamp. > I know that > - the events take place during the day, say between 10:30 and 22:30 > - it's always a set of events at one location spaced about 30min apart > - the imported

Re: [SQL] data import: 12-hour time w/o AM/PM

2011-02-08 Thread Oliveiros d'Azevedo Cristina
bruary 08, 2011 6:14 PM Subject: [SQL] data import: 12-hour time w/o AM/PM I am importing data in CSV format. My technique is to COPY the data into interim tables (starting with a "z") where I analyze them, clean up inconsistencies; eventually I will populate the "proper" tabl

[SQL] data import: 12-hour time w/o AM/PM

2011-02-08 Thread Tarlika Elisabeth Schmitz
I am importing data in CSV format. My technique is to COPY the data into interim tables (starting with a "z") where I analyze them, clean up inconsistencies; eventually I will populate the "proper" tables with these data. (In the example below: COPY CSV into zevent, from there populate event.) The

Re: [SQL] data import

2010-12-28 Thread Viktor Bojović
Thanx Chris. Also i want to thank Achilleas and Pavel for help On Tue, Dec 21, 2010 at 5:18 PM, Chris Ruprecht wrote: > If your file is TAB delimited, you can simply do: > > \copy tablename from 'some file' > > To get details in psql, do: > psql mydatabase > and at the prompt: > \h copy > > > >

Re: [SQL] data import

2010-12-21 Thread Chris Ruprecht
If your file is TAB delimited, you can simply do: \copy tablename from 'some file' To get details in psql, do: psql mydatabase and at the prompt: \h copy On Dec 21, 2010, at 06:34 , Viktor Bojović wrote: > Hi, > > can anyone recommend me a windows and linux free tools for importing data > i

Re: [SQL] data import

2010-12-21 Thread Achilleas Mantzios
Στις Tuesday 21 December 2010 13:36:58 ο/η Pavel Stehule έγραψε: > Hello > > 2010/12/21 Viktor Bojović : > > Hi, > > > > can anyone recommend me a windows and linux free tools for importing data > > into postgre. > > Source files are CSV or excel. > Openoffice can do this job, populating a table

Re: [SQL] data import

2010-12-21 Thread Pavel Stehule
Hello 2010/12/21 Viktor Bojović : > Hi, > > can anyone recommend me a windows and linux free tools for importing data > into postgre. > Source files are CSV or excel. PostgreSQL can read a CVS files via a COPY statement. You can use a \copy metacommand too from psql Regards Pavel Stehule > Tha

[SQL] data import

2010-12-21 Thread Viktor Bojović
Hi, can anyone recommend me a windows and linux free tools for importing data into postgre. Source files are CSV or excel. Thanx in advance -- --- Viktor Bojović --- Wherever I go, Murphy goes with me