Skip site navigation (1) Skip section navigation (2)

Re: work on some tables in the same time.

From: Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com>
To: Jerome Raupach <jraupach(at)intelcom(dot)fr>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: work on some tables in the same time.
Date: 2000-09-13 16:39:04
Message-ID: Pine.BSF.4.10.10009130935210.23269-100000@megazone23.bigpanda.com (view raw or flat)
Thread:
Lists: pgsql-sql
I'm assuming you want "n" to be replaced by the numbers up to
the last one where there is a table1_n and table2_n, right?

I'd suggest looking and PL/TCL (or if you can wait for 7.1, you
can probably do it in PL/PGSQL as well with the new exec stuff.)
and writing a function that does the inserts for you.

Stephan Szabo
sszabo(at)bigpanda(dot)com

On Wed, 13 Sep 2000, Jerome Raupach wrote:

> I want to execute this query on some table2 in the same time :
> 
> INSERT INTO table2_n(f1, f2, f3)
> 	SELECT DISTINCT f1, f2, f3 FROM table1_n ;
> 
> ------------------------------------------------------------------
> 
> CREATE TABLE table1_1( INT2 f1, INT2 f2, INT2 f3, INT2 f4 );
> CREATE TABLE table1_2( INT2 f1, INT2 f2, INT2 f3, INT2 f4 );
> ...
> 
> CREATE TABLE table2_1( INT2 f1, INT2 f2, INT2 f3 );
> CREATE TABLE table2_2( INT2 f1, INT2 f2, INT2 f3 );
> ...
> 
> ------------------------------------------------------------------
> 
> Anyone can help me ?
> Thanks in advance.
> 
> Jerome.
> 



In response to

pgsql-sql by date

Next:From: Jie LiangDate: 2000-09-13 16:59:12
Subject: Re: PLSQL
Previous:From: Ian TurnerDate: 2000-09-13 16:14:55
Subject: Re: work on some tables in the same time.

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group