Re: [SQL] Separating data sets in a table

2002-08-28 Thread OU
"Andreas Tille" <[EMAIL PROTECTED]> a écrit dans le message de news: [EMAIL PROTECTED] ... > I tried to do the following approach: > >CREATE LOCAL TEMPORARY TABLE ImportOK () INHERITS (Import) ; > >INSERT INTO ImportOK SELECT * FROM Import i > INNER JOIN Ref r ON i.Id = r.Id;

Re: [SQL] Separating data sets in a table

2002-08-26 Thread Oliver Elphick
On Mon, 2002-08-26 at 10:46, Andreas Tille wrote: > On 26 Aug 2002, Oliver Elphick wrote: > > > Select from the temporary table all items that satisfy the > > constraints, insert them into the real table and delete them from > > the temporary table: > > > > BEGIN; > >

Re: [SQL] Separating data sets in a table

2002-08-26 Thread Andreas Tille
On 26 Aug 2002, Oliver Elphick wrote: > Create a temporary table (no constraints) > > CREATE TEMP TABLE temptable AS > (SELECT * FROM tablename LIMIT 1); > DELETE FROM temptable; > > Copy all data into the temporary table > > COPY temptable FROM 'filepath

Re: [SQL] Separating data sets in a table

2002-08-26 Thread Oliver Elphick
On Mon, 2002-08-26 at 07:26, Andreas Tille wrote: > Well for sure this might be an option but as I said I receive the data > in the dump format apropriate to use "COPY FROM ". Would > you really like to suggest me to split those data sets into single lines? > Moreover I'm not sure about how to c

Re: [SQL] Separating data sets in a table

2002-08-25 Thread Andreas Tille
On Sun, 25 Aug 2002, Mark Stosberg wrote: > Thanks for the clarification. Here's an idea about how to solve your > problem. As you are importing your data, instead of doing it all at > once, try import it a row at a time into a table that has the RI turned > on. Check each insert to see if it's s

Re: [SQL] Separating data sets in a table

2002-08-25 Thread Mark Stosberg
On Sun, 25 Aug 2002, Andreas Tille wrote: > On Sat, 24 Aug 2002, Mark Stosberg wrote: > > > On Thu, 22 Aug 2002, Andreas Tille wrote: > > > Hello, > > > > > > I want to solve the following problem: > > > > > > CREATE TABLE Ref( Id int ) ; > > > CREATE TABLE Import ( Idint, > > >

Re: [SQL] Separating data sets in a table

2002-08-25 Thread Andreas Tille
On Sat, 24 Aug 2002, Mark Stosberg wrote: > On Thu, 22 Aug 2002, Andreas Tille wrote: > > Hello, > > > > I want to solve the following problem: > > > > CREATE TABLE Ref( Id int ) ; > > CREATE TABLE Import ( Idint, > > Other varchar(42), > > Flag

[SQL] Separating data sets in a table

2002-08-22 Thread Andreas Tille
Hello, I want to solve the following problem: CREATE TABLE Ref( Id int ) ; CREATE TABLE Import ( Idint, Other varchar(42), Flag int, Tstimestamp ) ; CREATE TABLE Data ( Idint, Other varchar