Re: [pgsql-ayuda] query

From: olea(at)hispafuentes(dot)com
To: pgsql-ayuda(at)tlali(dot)iztacala(dot)unam(dot)mx
Subject: Re: [pgsql-ayuda] query
Date: 2001-02-01 09:39:04
Message-ID: 3A792EB8.F78C17D9@hispafuentes.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-es-ayuda


OCR escribió:
>
> > OCR writes:
> > >
> > > En la misma tonica:
> > > Como puedo buscar palabras que las escribieron con o sin acentos(o
> > > caracteres españoles p. ej ñ, ü, etc.)
> > > por ejemplo si busco
> > > SELECT * FROM tabla1 WHERE lower(decripcion) LIKE "%rene%";
> > > me aparecen todos : Rene, rene RENE etc
> > > pero no me aperecen rené ,René etc.
> > > Como le ago para encluir las palabras con acentos.
> > > GRACIAS
> > Este es un problama bastante más complicado. El problema es que
> > postgres no tiene manera de saber cuales son los caracteres que
> > consideras 'equivalentes', puesto que esto depende del idioma, y del
> > juego de caracteres que se este usando. Una solución podria ser
> > escribir (en C) una función como lower, que traduzca los caracteres
> > a su equivalente sin acentos. Si te sientes ambicioso, podrias hacerla
> > generica, con un segundo argumento que le espefifique exactamente que
> > traducción efectuar :-)
> Me late la idea, tu sabes donde puedo ver como fue programada la funcion
> lower o upper.
> Saludos.

http://www.gnu.org/directory/glibc.html

Deberías buscar por los foros de i18n (internationalitation) no sea que
alguien haya empezado ese trabajo.

--
A.Ismael Olea González
tlf 914 575 330
mailto:olea(at)hispafuentes(dot)com
--------- Pie de mensaje -------------------------------------------
Archivo historico: http://tlali.iztacala.unam.mx/maillist/pgsql-ayuda
Cancelar inscripcion:
mail to: majordomo(at)tlali(dot)iztacala(dot)unam(dot)mx
text : unsubscribe pgsql-ayuda

>From pgsql-ayuda-owner Thu Feb 1 16:09:53 2001
X-Mozilla-Status: 0011
X-Mozilla-Status2: 00000000
Return-Path: <pgsql-ayuda-owner>
Received: (from majordomo(at)localhost)
by tlali.iztacala.unam.mx (8.11.0/8.11.0) id f11M9rc03728
for pgsql-ayuda-outgoing; Thu, 1 Feb 2001 16:09:53 -0600
X-Authentication-Warning: tlali.iztacala.unam.mx: majordomo set sender to owner-pgsql-ayuda(at)tlali(dot)iztacala(dot)unam(dot)mx using -f
Received: from everest.andrade.casa ([132.248.111.115])
by tlali.iztacala.unam.mx (8.11.0/8.11.0) with ESMTP id f11M9oK03725
for <pgsql-ayuda(at)tlali(dot)iztacala(dot)unam(dot)mx>; Thu, 1 Feb 2001 16:09:50 -0600
Received: (from rodrigo(at)localhost)
by everest.andrade.casa (8.9.3/8.9.3) id QAA01503;
Thu, 1 Feb 2001 16:13:35 -0600
From: Luis Rodrigo Gallardo Cruz <lrgallardo(at)abl(dot)com(dot)mx>
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Message-ID: <14969(dot)57231(dot)529944(dot)551866(at)everest(dot)andrade(dot)casa>
Date: Thu, 1 Feb 2001 16:13:35 -0600 (CST)
To: pgsql-ayuda(at)tlali(dot)iztacala(dot)unam(dot)mx
Subject: Re: [pgsql-ayuda] query
In-Reply-To: <005001c08bb2$2e778c00$8700a8c0(at)shore(dot)com(dot)mx>
References: <3440CE94D081D41182F600A024E99BEC01209DD9(at)EDTEXCHANGE>
<002301c08ae9$e79ccd40$8700a8c0(at)shore(dot)com(dot)mx>
<14967(dot)4904(dot)531491(dot)529775(at)everest(dot)andrade(dot)casa>
<005001c08bb2$2e778c00$8700a8c0(at)shore(dot)com(dot)mx>
X-Mailer: VM 6.75 under 21.1 (patch 12) "Channel Islands" XEmacs Lucid
Content-Transfer-Encoding: 8bit
X-MIME-Autoconverted: from quoted-printable to 8bit by tlali.iztacala.unam.mx id f11M9qK03726
Sender: owner-pgsql-ayuda(at)tlali(dot)iztacala(dot)unam(dot)mx
Precedence: bulk
Reply-To: pgsql-ayuda
Content-Length: 1004
Lines: 23

OCR writes:
> > Este es un problama bastante más complicado. El problema es que
> > postgres no tiene manera de saber cuales son los caracteres que
> > consideras 'equivalentes', puesto que esto depende del idioma, y del
> > juego de caracteres que se este usando. Una solución podria ser
> > escribir (en C) una función como lower, que traduzca los caracteres
> > a su equivalente sin acentos. Si te sientes ambicioso, podrias hacerla
> > generica, con un segundo argumento que le espefifique exactamente que
> > traducción efectuar :-)
> Me late la idea, tu sabes donde puedo ver como fue programada la funcion
> lower o upper.
> Saludos.
Sip, busca en el código fuente de postgres, el archivo
src/backend/utils/adt/oracle_compat.c
ahí está.
--
Rodrigo
--------- Pie de mensaje -------------------------------------------
Archivo historico: http://tlali.iztacala.unam.mx/maillist/pgsql-ayuda
Cancelar inscripcion:
mail to: majordomo(at)tlali(dot)iztacala(dot)unam(dot)mx
text : unsubscribe pgsql-ayuda

>From pgsql-ayuda-owner Tue Feb 6 18:16:15 2001
X-Mozilla-Status: 0001
X-Mozilla-Status2: 00000000
Return-Path: <pgsql-ayuda-owner>
Received: (from majordomo(at)localhost)
by tlali.iztacala.unam.mx (8.11.0/8.11.0) id f170GFH27640
for pgsql-ayuda-outgoing; Tue, 6 Feb 2001 18:16:15 -0600
X-Authentication-Warning: tlali.iztacala.unam.mx: majordomo set sender to owner-pgsql-ayuda(at)tlali(dot)iztacala(dot)unam(dot)mx using -f
Received: from maihue.terra.cl (maihue.ctcinternet.cl [200.28.216.11])
by tlali.iztacala.unam.mx (8.11.0/8.11.0) with ESMTP id f170GBN27637
for <pgsql-ayuda(at)tlali(dot)iztacala(dot)unam(dot)mx>; Tue, 6 Feb 2001 18:16:13 -0600
Received: from pablo (200.28.165.182) by maihue.terra.cl (5.0.040)
id 3A7F5A3100001371 for pgsql-ayuda(at)tlali(dot)iztacala(dot)unam(dot)mx; Tue, 6 Feb 2001 00:29:12 -0300
Message-ID: <3A7F5A3100001371(at)maihue(dot)terra(dot)cl> (added by postmaster(at)ctcinternet(dot)cl)
Date: Tue, 06 Feb 2001 00:26:29 -0400
To: pgsql-ayuda(at)tlali(dot)iztacala(dot)unam(dot)mx
From: backbone <backbone(at)ctcinternet(dot)cl>
Subject: [pgsql-ayuda] no puedo crear Foreign Key
X-Mailer: Opera 5.01 build 840
X-Priority: 3 (Normal)
Mime-Version: 1.0
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: 8bit
X-MIME-Autoconverted: from Quoted-Printable to 8bit by tlali.iztacala.unam.mx id f170GEN27638
Sender: owner-pgsql-ayuda(at)tlali(dot)iztacala(dot)unam(dot)mx
Precedence: bulk
Reply-To: pgsql-ayuda
Content-Length: 1256
Lines: 40

hola a todos..
el problema que tengo es que no puedo crear foreign keys, por ejemplo al crear las siguientes tablas:

create table RAMO
(
CODRAMO CHAR(2) ,
NOMBRERAMO CHAR(70) not null,
NUMPREGUNTAS INTEGER not null,
primary key (CODRAMO)
);

-- aqui creo la Foreign Key
-- ------------------------------------------
create table LIBRO
(
CODLIBRO SERIAL ,
CODRAMO CHAR(2) REFERENCES RAMO,
AUTORLIBRO CHAR(255) ,
TITULOLIBRO CHAR(255) not null,
primary key (CODLIBRO)
);

pero al ejecutar esto me entrega:
NOTICE: CREATE TABLE/FOREIGN KEY clause ignored, not yet implemented.

¿que es lo que me falta para que pueda crear la foreign key??
me falto algo al instalar postgres??? (tengo el que viene con redhat 6.2)
desde ya muchisimas gracias.. y disculpen si es algo muy tonto lo que estoy preguntando..

Back..

--------- Pie de mensaje -------------------------------------------
Archivo historico: http://tlali.iztacala.unam.mx/maillist/pgsql-ayuda
Cancelar inscripcion:
mail to: majordomo(at)tlali(dot)iztacala(dot)unam(dot)mx
text : unsubscribe pgsql-ayuda

>From pgsql-ayuda-owner Tue Feb 6 18:52:48 2001
X-Mozilla-Status: 0011
X-Mozilla-Status2: 00000000
Return-Path: <pgsql-ayuda-owner>
Received: (from majordomo(at)localhost)
by tlali.iztacala.unam.mx (8.11.0/8.11.0) id f170qmD27726
for pgsql-ayuda-outgoing; Tue, 6 Feb 2001 18:52:48 -0600
X-Authentication-Warning: tlali.iztacala.unam.mx: majordomo set sender to owner-pgsql-ayuda(at)tlali(dot)iztacala(dot)unam(dot)mx using -f
Received: from inter.interservice.com.mx (inter.interservice.com.mx [132.247.1.20])
by tlali.iztacala.unam.mx (8.11.0/8.11.0) with ESMTP id f170qlN27723
for <pgsql-ayuda(at)tlali(dot)iztacala(dot)unam(dot)mx>; Tue, 6 Feb 2001 18:52:47 -0600
Received: from localhost (randrade(at)localhost)
by inter.interservice.com.mx (8.8.7/8.8.7) with ESMTP id TAA26834
for <pgsql-ayuda(at)tlali(dot)iztacala(dot)unam(dot)mx>; Tue, 6 Feb 2001 19:02:40 -0600
Date: Tue, 6 Feb 2001 19:02:40 -0600 (CST)
From: "Ing. Roberto Andrade Fonseca" <randrade(at)abl(dot)com(dot)mx>
X-Sender: randrade(at)inter(dot)interservice(dot)com(dot)mx
To: pgsql-ayuda(at)tlali(dot)iztacala(dot)unam(dot)mx
Subject: Re: [pgsql-ayuda] no puedo crear Foreign Key
In-Reply-To: <3A7F5A3100001371(at)maihue(dot)terra(dot)cl> (added by postmaster(at)ctcinternet(dot)cl)
Message-ID: <Pine(dot)LNX(dot)4(dot)10(dot)10102061855500(dot)26455-100000(at)inter(dot)interservice(dot)com(dot)mx>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
X-MIME-Autoconverted: from QUOTED-PRINTABLE to 8bit by tlali.iztacala.unam.mx id f170qlN27724
Sender: owner-pgsql-ayuda(at)tlali(dot)iztacala(dot)unam(dot)mx
Precedence: bulk
Reply-To: pgsql-ayuda
Content-Length: 1067
Lines: 36

Hola:

On Tue, 6 Feb 2001, backbone wrote:

> hola a todos..
> el problema que tengo es que no puedo crear foreign keys, por ejemplo al crear las siguientes tablas:
>
>
> pero al ejecutar esto me entrega:
> NOTICE: CREATE TABLE/FOREIGN KEY clause ignored, not yet implemented.
>
> ¿que es lo que me falta para que pueda crear la foreign key??
> me falto algo al instalar postgres??? (tengo el que viene con redhat 6.2)

Si no está implementado es que no tiene esa funcionalidad, no te falta nada, ni instalaste mal.

Usa: REFERENCES.

No estoy seguro si la versión que trae el RH 6.2 ya tiene referencias, pero te recomiendo que
migres a la 7.0.3, esta seguro ya la tiene implementada.

Revisa: el libro de Bruce en:

http://www.postgresql.org/docs/awbook.html

para los detalles.

Roberto Andrade Fonseca
randrade(at)abl(dot)com(dot)mx

--------- Pie de mensaje -------------------------------------------
Archivo historico: http://tlali.iztacala.unam.mx/maillist/pgsql-ayuda
Cancelar inscripcion:
mail to: majordomo(at)tlali(dot)iztacala(dot)unam(dot)mx
text : unsubscribe pgsql-ayuda

>From pgsql-ayuda-owner Tue Feb 6 21:19:30 2001
X-Mozilla-Status: 0001
X-Mozilla-Status2: 00000000
Return-Path: <pgsql-ayuda-owner>
Received: (from majordomo(at)localhost)
by tlali.iztacala.unam.mx (8.11.0/8.11.0) id f173JU228475
for pgsql-ayuda-outgoing; Tue, 6 Feb 2001 21:19:30 -0600
X-Authentication-Warning: tlali.iztacala.unam.mx: majordomo set sender to owner-pgsql-ayuda(at)tlali(dot)iztacala(dot)unam(dot)mx using -f
Received: from maihue.terra.cl (maihue.ctcinternet.cl [200.28.216.11])
by tlali.iztacala.unam.mx (8.11.0/8.11.0) with ESMTP id f173JRN28472
for <pgsql-ayuda(at)tlali(dot)iztacala(dot)unam(dot)mx>; Tue, 6 Feb 2001 21:19:28 -0600
Received: from pablo (200.28.163.156) by maihue.terra.cl (5.0.040)
id 3A7F117E000009DA for pgsql-ayuda(at)tlali(dot)iztacala(dot)unam(dot)mx; Mon, 5 Feb 2001 18:12:53 -0300
Message-ID: <3A7F117E000009DA(at)maihue(dot)terra(dot)cl> (added by postmaster(at)ctcinternet(dot)cl)
Date: Mon, 05 Feb 2001 18:10:11 -0400
To: pgsql-ayuda(at)tlali(dot)iztacala(dot)unam(dot)mx
From: backbone <backbone(at)ctcinternet(dot)cl>
Subject: [pgsql-ayuda] no puedo crear Foreign Key
X-Mailer: Opera 5.01 build 840
X-Priority: 3 (Normal)
Mime-Version: 1.0
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: 8bit
X-MIME-Autoconverted: from Quoted-Printable to 8bit by tlali.iztacala.unam.mx id f173JTN28473
Sender: owner-pgsql-ayuda(at)tlali(dot)iztacala(dot)unam(dot)mx
Precedence: bulk
Reply-To: pgsql-ayuda
Content-Length: 1254
Lines: 38

hola a todos..
el problema que tengo es que no puedo crear foreign keys, por ejemplo al crear las siguientes tablas:

create table RAMO
(
CODRAMO CHAR(2) ,
NOMBRERAMO CHAR(70) not null,
NUMPREGUNTAS INTEGER not null,
primary key (CODRAMO)
);

-- aqui creo la Foreign Key
-- ------------------------------------------
create table LIBRO
(
CODLIBRO SERIAL ,
CODRAMO CHAR(2) REFERENCES RAMO,
AUTORLIBRO CHAR(255) ,
TITULOLIBRO CHAR(255) not null,
primary key (CODLIBRO)
);

pero al ejecutar esto me entrega:
NOTICE: CREATE TABLE/FOREIGN KEY clause ignored, not yet implemented.

¿que es lo que me falta para que pueda crear la foreign key??
me falto algo al instalar postgres??? (tengo el que viene con redhat 6.2)
desde ya muchisimas gracias.. y disculpen si es algo muy tonto lo que estoy preguntando..

Back..

--------- Pie de mensaje -------------------------------------------
Archivo historico: http://tlali.iztacala.unam.mx/maillist/pgsql-ayuda
Cancelar inscripcion:
mail to: majordomo(at)tlali(dot)iztacala(dot)unam(dot)mx
text : unsubscribe pgsql-ayuda

>From pgsql-ayuda-owner Wed Feb 7 06:35:13 2001
X-Mozilla-Status: 0011
X-Mozilla-Status2: 00000000
Return-Path: <pgsql-ayuda-owner>
Received: (from majordomo(at)localhost)
by tlali.iztacala.unam.mx (8.11.0/8.11.0) id f17CZD729959
for pgsql-ayuda-outgoing; Wed, 7 Feb 2001 06:35:13 -0600
X-Authentication-Warning: tlali.iztacala.unam.mx: majordomo set sender to owner-pgsql-ayuda(at)tlali(dot)iztacala(dot)unam(dot)mx using -f
Received: from tairona.tairona.banrep.gov.co ([200.25.32.220])
by tlali.iztacala.unam.mx (8.11.0/8.11.0) with ESMTP id f17CZCt29956
for <pgsql-ayuda(at)tlali(dot)iztacala(dot)unam(dot)mx>; Wed, 7 Feb 2001 06:35:12 -0600
Received: from mailbanr.banrep.gov.co (mailbanr [172.16.107.32]) by tairona.tairona.banrep.gov.co with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2650.21)
id 13A1YSB8; Wed, 7 Feb 2001 07:38:25 -0500
Received: by mailbanr.banrep.gov.co with Internet Mail Service (5.5.2650.21)
id <1DS77G0W>; Wed, 7 Feb 2001 07:37:27 -0500
Message-ID: <CC2494A989FAD21183A40008C7A42D4C1BCB328C(at)mailbanr(dot)banrep(dot)gov(dot)co>
From: Molina Leon Guillermo Alfonso <gmolinle(at)banrep(dot)gov(dot)co>
To: "'pgsql-ayuda(at)tlali(dot)iztacala(dot)unam(dot)mx'"
<pgsql-ayuda(at)tlali(dot)iztacala(dot)unam(dot)mx>
Subject: RE: [pgsql-ayuda] no puedo crear Foreign Key
Date: Wed, 7 Feb 2001 07:37:27 -0500
MIME-Version: 1.0
X-Mailer: Internet Mail Service (5.5.2650.21)
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 8bit
X-MIME-Autoconverted: from quoted-printable to 8bit by tlali.iztacala.unam.mx id f17CZDt29957
Sender: owner-pgsql-ayuda(at)tlali(dot)iztacala(dot)unam(dot)mx
Precedence: bulk
Reply-To: pgsql-ayuda
Content-Length: 1914
Lines: 64

te envio un ejemplo sobre integridades referenciales:

CREATE TABLE TUPI_INTERMEDIARIO (
CA_COD_INT INTEGER PRIMARY KEY NOT NULL,
CA_CODG_SUCU INTEGER CONSTRAINT fk_tupi_intermediario_suc REFERENCES
TUPI_SUCURSALES,
CA_DESC VARCHAR(200) NOT NULL,
CA_MNEMONICO VARCHAR(6),
CA_DIRECCION VARCHAR(100),
CONSTRAINT tupi_intermediario_ukey UNIQUE (CA_cod_int, CA_codg_sucu)
);

-----Original Message-----
From: Ing. Roberto Andrade Fonseca [mailto:randrade(at)abl(dot)com(dot)mx]
Sent: martes 6 de febrero de 2001 20:03
To: pgsql-ayuda(at)tlali(dot)iztacala(dot)unam(dot)mx
Subject: Re: [pgsql-ayuda] no puedo crear Foreign Key

Hola:

On Tue, 6 Feb 2001, backbone wrote:

> hola a todos..
> el problema que tengo es que no puedo crear foreign keys, por ejemplo al
crear las siguientes tablas:
>
>
> pero al ejecutar esto me entrega:
> NOTICE: CREATE TABLE/FOREIGN KEY clause ignored, not yet implemented.
>
> ¿que es lo que me falta para que pueda crear la foreign key??
> me falto algo al instalar postgres??? (tengo el que viene con redhat 6.2)

Si no está implementado es que no tiene esa funcionalidad, no te falta nada,
ni instalaste mal.

Usa: REFERENCES.

No estoy seguro si la versión que trae el RH 6.2 ya tiene referencias, pero
te recomiendo que
migres a la 7.0.3, esta seguro ya la tiene implementada.

Revisa: el libro de Bruce en:

http://www.postgresql.org/docs/awbook.html

para los detalles.

Roberto Andrade Fonseca
randrade(at)abl(dot)com(dot)mx

--------- Pie de mensaje -------------------------------------------
Archivo historico: http://tlali.iztacala.unam.mx/maillist/pgsql-ayuda
Cancelar inscripcion:
mail to: majordomo(at)tlali(dot)iztacala(dot)unam(dot)mx
text : unsubscribe pgsql-ayuda
--------- Pie de mensaje -------------------------------------------
Archivo historico: http://tlali.iztacala.unam.mx/maillist/pgsql-ayuda
Cancelar inscripcion:
mail to: majordomo(at)tlali(dot)iztacala(dot)unam(dot)mx
text : unsubscribe pgsql-ayuda

>From pgsql-ayuda-owner Mon Feb 19 08:32:54 2001
X-Mozilla-Status: 0001
X-Mozilla-Status2: 00000000
Return-Path: <pgsql-ayuda-owner>
Received: (from majordomo(at)localhost)
by tlali.iztacala.unam.mx (8.11.0/8.11.0) id f1JEWsP20836
for pgsql-ayuda-outgoing; Mon, 19 Feb 2001 08:32:54 -0600
X-Authentication-Warning: tlali.iztacala.unam.mx: majordomo set sender to owner-pgsql-ayuda(at)tlali(dot)iztacala(dot)unam(dot)mx using -f
Received: from dg.aloccidente.com (dg.aloccidente.com [63.65.214.82])
by tlali.iztacala.unam.mx (8.11.0/8.11.0) with ESMTP id f1JEWka20833
for <pgsql-ayuda(at)tlali(dot)iztacala(dot)unam(dot)mx>; Mon, 19 Feb 2001 08:32:48 -0600
Received: from aloccidente.com (andergp(at)auxsist(dot)aloccidente(dot)com [192.168.0.19])
by dg.aloccidente.com (8.8.7/8.8.7) with ESMTP id IAA09503
for <pgsql-ayuda(at)tlali(dot)iztacala(dot)unam(dot)mx>; Mon, 19 Feb 2001 08:27:00 -0500
Message-ID: <3A91339A(dot)A5700EEB(at)aloccidente(dot)com>
Date: Mon, 19 Feb 2001 09:54:18 -0500
From: anderson gutierrez pizarro <andergp(at)aloccidente(dot)com>
X-Mailer: Mozilla 4.72 [es] (X11; U; Linux 2.2.14-5.0 i686)
X-Accept-Language: es
MIME-Version: 1.0
To: pgsql-ayuda(at)tlali(dot)iztacala(dot)unam(dot)mx
Subject: [pgsql-ayuda] Ayuda
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Sender: owner-pgsql-ayuda(at)tlali(dot)iztacala(dot)unam(dot)mx
Precedence: bulk
Reply-To: pgsql-ayuda
Content-Length: 548
Lines: 23

Buenos dias lista.
Tengo el siguiente problema .
cuatro tablas
uno dos tres
x y z

deseo tener una cuarta tabla con los datos de uno+dos+tres
cuatro
xyz
sin que en algun caso los datos de la uno,dos,tres se repitan en la
cuatro.

gracias lista por la ayuda prestada.

anderson

--------- Pie de mensaje -------------------------------------------
Archivo historico: http://tlali.iztacala.unam.mx/maillist/pgsql-ayuda
Cancelar inscripcion:
mail to: majordomo(at)tlali(dot)iztacala(dot)unam(dot)mx
text : unsubscribe pgsql-ayuda

>From pgsql-ayuda-owner Mon Feb 19 09:45:58 2001
X-Mozilla-Status: 0011
X-Mozilla-Status2: 00000000
Return-Path: <pgsql-ayuda-owner>
Received: (from majordomo(at)localhost)
by tlali.iztacala.unam.mx (8.11.0/8.11.0) id f1JFjwJ21102
for pgsql-ayuda-outgoing; Mon, 19 Feb 2001 09:45:58 -0600
X-Authentication-Warning: tlali.iztacala.unam.mx: majordomo set sender to owner-pgsql-ayuda(at)tlali(dot)iztacala(dot)unam(dot)mx using -f
Received: from janus ([195.57.248.4])
by tlali.iztacala.unam.mx (8.11.0/8.11.0) with ESMTP id f1JFjua21099
for <pgsql-ayuda(at)tlali(dot)iztacala(dot)unam(dot)mx>; Mon, 19 Feb 2001 09:45:56 -0600
Received: from pere (unverified [195.57.248.239]) by janus
(Rockliffe SMTPRA 2.1.7) with SMTP id <B0000150174(at)janus> for <pgsql-ayuda(at)tlali(dot)iztacala(dot)unam(dot)mx>;
Mon, 19 Feb 2001 16:48:31 +0100
Message-ID: <000d01c09a8a$bf6cd940$07649680(at)128(dot)150(dot)100(dot)7>
From: "Jose Muro" <jomupe(at)sicon(dot)net>
To: <pgsql-ayuda(at)tlali(dot)iztacala(dot)unam(dot)mx>
References: <3A91339A(dot)A5700EEB(at)aloccidente(dot)com>
Subject: Re: [pgsql-ayuda] Ayuda
Date: Mon, 19 Feb 2001 16:43:47 +0100
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 8bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.50.4133.2400
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
Sender: owner-pgsql-ayuda(at)tlali(dot)iztacala(dot)unam(dot)mx
Precedence: bulk
Reply-To: pgsql-ayuda
Content-Length: 1246
Lines: 47

Buenas tardes.

Exactamente que quieres decir con uno+dos+tres

Que se combinen todos los campos de las tablas y no haya ninguno repetido

O que combine los datos por filas sin que se repita ninguno.

Un saludo. José

----- Original Message -----
From: "anderson gutierrez pizarro" <andergp(at)aloccidente(dot)com>
To: <pgsql-ayuda(at)tlali(dot)iztacala(dot)unam(dot)mx>
Sent: Monday, February 19, 2001 3:54 PM
Subject: [pgsql-ayuda] Ayuda

> Buenos dias lista.
> Tengo el siguiente problema .
> cuatro tablas
> uno dos tres
> x y z
>
> deseo tener una cuarta tabla con los datos de uno+dos+tres
> cuatro
> xyz
> sin que en algun caso los datos de la uno,dos,tres se repitan en la
> cuatro.
>
> gracias lista por la ayuda prestada.
>
>
> anderson
>
> --------- Pie de mensaje -------------------------------------------
> Archivo historico: http://tlali.iztacala.unam.mx/maillist/pgsql-ayuda
> Cancelar inscripcion:
> mail to: majordomo(at)tlali(dot)iztacala(dot)unam(dot)mx
> text : unsubscribe pgsql-ayuda
>

--------- Pie de mensaje -------------------------------------------
Archivo historico: http://tlali.iztacala.unam.mx/maillist/pgsql-ayuda
Cancelar inscripcion:
mail to: majordomo(at)tlali(dot)iztacala(dot)unam(dot)mx
text : unsubscribe pgsql-ayuda

>From pgsql-ayuda-owner Mon Feb 19 13:12:46 2001
X-Mozilla-Status: 0011
X-Mozilla-Status2: 00000000
Return-Path: <pgsql-ayuda-owner>
Received: (from majordomo(at)localhost)
by tlali.iztacala.unam.mx (8.11.0/8.11.0) id f1JJCkA22003
for pgsql-ayuda-outgoing; Mon, 19 Feb 2001 13:12:46 -0600
X-Authentication-Warning: tlali.iztacala.unam.mx: majordomo set sender to owner-pgsql-ayuda(at)tlali(dot)iztacala(dot)unam(dot)mx using -f
Received: from smtp.prodigy.net.mx (dfproxy02.prodigy.net.mx [148.235.168.57] (may be forged))
by tlali.iztacala.unam.mx (8.11.0/8.11.0) with ESMTP id f1JJCj922000
for <pgsql-ayuda(at)tlali(dot)iztacala(dot)unam(dot)mx>; Mon, 19 Feb 2001 13:12:45 -0600
Received: from aquarius (du-148-221-104-169.prodigy.net.mx [148.221.104.169])
by SMTP.Prodigy.Net.mx (Sun Internet Mail Server sims.4.0.2000.05.17.04.13.p6)
with SMTP id <0G90007RGQOV3R(at)SMTP(dot)Prodigy(dot)Net(dot)mx>; Mon,
19 Feb 2001 13:12:32 -0600 (CST)
Date: Mon, 19 Feb 2001 13:15:23 -0600
From: =?iso-8859-1?Q?H=E9ctor_Balanzar?= <hbalanzar(at)gnovus(dot)com>
Subject: Re: [pgsql-ayuda] Ayuda
To: pgsql-ayuda(at)tlali(dot)iztacala(dot)unam(dot)mx
Message-id: <000a01c09aa8$4fa28c90$0342a8c0(at)aquarius>
MIME-version: 1.0
X-MIMEOLE: Produced By Microsoft MimeOLE V5.00.2919.6700
X-Mailer: Microsoft Outlook Express 5.00.2919.6700
Content-type: text/plain; charset=iso-8859-1
Content-transfer-encoding: 8BIT
X-Priority: 3
X-MSMail-priority: Normal
References: <3A91339A(dot)A5700EEB(at)aloccidente(dot)com>
<000d01c09a8a$bf6cd940$07649680(at)128(dot)150(dot)100(dot)7>
Sender: owner-pgsql-ayuda(at)tlali(dot)iztacala(dot)unam(dot)mx
Precedence: bulk
Reply-To: pgsql-ayuda
Content-Length: 1535
Lines: 55

Anderson:

Faltan datos para responder adecuadamente tu pregunta, pero de lo que
entendí se me ocurrió esto, espero te sirva:

El siguiente query arroja la suma de los datos de los campos de tres tablas
diferentes a una cuarta tabla....los campos deben ser numéricos.

SELECT DISTINCT (uno.campo + dos.campo + tres.campo) AS resultado from uno,
dos, tres INTO TABLE cuatro;

Este otro query concatena los datos de los campos de tres tablas diferentes
y los guarda en una cuarta tabla .......los campos deben ser alfabeticos.

SELECT DISTINCT (uno.campo || ' ' || dos.campo || ' ' || tres.campo) AS
resultado from uno, dos, tres INTO TABLE cuatro;

Atte.
Héctor Balanzar
hbalanzar(at)gnovus(dot)com
#ICQ: 26387957

> ----- Original Message -----
> From: "anderson gutierrez pizarro" <andergp(at)aloccidente(dot)com>
> To: <pgsql-ayuda(at)tlali(dot)iztacala(dot)unam(dot)mx>
> Sent: Monday, February 19, 2001 3:54 PM
> Subject: [pgsql-ayuda] Ayuda
>
>
> > Buenos dias lista.
> > Tengo el siguiente problema .
> > cuatro tablas
> > uno dos tres
> > x y z
> >
> > deseo tener una cuarta tabla con los datos de uno+dos+tres
> > cuatro
> > xyz
> > sin que en algun caso los datos de la uno,dos,tres se repitan en la
> > cuatro.
> >
> > gracias lista por la ayuda prestada.
> >
> >
> > anderson

--------- Pie de mensaje -------------------------------------------
Archivo historico: http://tlali.iztacala.unam.mx/maillist/pgsql-ayuda
Cancelar inscripcion:
mail to: majordomo(at)tlali(dot)iztacala(dot)unam(dot)mx
text : unsubscribe pgsql-ayuda

>From pgsql-ayuda-owner Mon Feb 19 15:04:21 2001
X-Mozilla-Status: 0011
X-Mozilla-Status2: 00000000
Return-Path: <pgsql-ayuda-owner>
Received: (from majordomo(at)localhost)
by tlali.iztacala.unam.mx (8.11.0/8.11.0) id f1JL4LI22533
for pgsql-ayuda-outgoing; Mon, 19 Feb 2001 15:04:21 -0600
X-Authentication-Warning: tlali.iztacala.unam.mx: majordomo set sender to owner-pgsql-ayuda(at)tlali(dot)iztacala(dot)unam(dot)mx using -f
Received: from dg.aloccidente.com (IDENT:root(at)dg(dot)aloccidente(dot)com [63.65.214.82])
by tlali.iztacala.unam.mx (8.11.0/8.11.0) with ESMTP id f1JL46A22526
for <pgsql-ayuda(at)tlali(dot)iztacala(dot)unam(dot)mx>; Mon, 19 Feb 2001 15:04:16 -0600
Received: from aloccidente.com (andergp(at)auxsist(dot)aloccidente(dot)com [192.168.0.19])
by dg.aloccidente.com (8.8.7/8.8.7) with ESMTP id OAA09073
for <pgsql-ayuda(at)tlali(dot)iztacala(dot)unam(dot)mx>; Mon, 19 Feb 2001 14:58:23 -0500
Message-ID: <3A918F05(dot)AF30A385(at)aloccidente(dot)com>
Date: Mon, 19 Feb 2001 16:24:22 -0500
From: anderson gutierrez pizarro <andergp(at)aloccidente(dot)com>
X-Mailer: Mozilla 4.72 [es] (X11; U; Linux 2.2.14-5.0 i686)
X-Accept-Language: es
MIME-Version: 1.0
To: pgsql-ayuda(at)tlali(dot)iztacala(dot)unam(dot)mx
Subject: Re: [pgsql-ayuda] Ayuda
References: <3A91339A(dot)A5700EEB(at)aloccidente(dot)com>
<000d01c09a8a$bf6cd940$07649680(at)128(dot)150(dot)100(dot)7> <000a01c09aa8$4fa28c90$0342a8c0(at)aquarius>
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
Sender: owner-pgsql-ayuda(at)tlali(dot)iztacala(dot)unam(dot)mx
Precedence: bulk
Reply-To: pgsql-ayuda
Content-Length: 2200
Lines: 99

Héctor Balanzar escribió:

> Anderson:
>
> Faltan datos para responder adecuadamente tu pregunta, pero de lo que
> entendí se me ocurrió esto, espero te sirva:
>
> El siguiente query arroja la suma de los datos de los campos de tres tablas
> diferentes a una cuarta tabla....los campos deben ser numéricos.
>
> SELECT DISTINCT (uno.campo + dos.campo + tres.campo) AS resultado from uno,
> dos, tres INTO TABLE cuatro;
>
> Este otro query concatena los datos de los campos de tres tablas diferentes
> y los guarda en una cuarta tabla .......los campos deben ser alfabeticos.
>
> SELECT DISTINCT (uno.campo || ' ' || dos.campo || ' ' || tres.campo) AS
> resultado from uno, dos, tres INTO TABLE cuatro;
>
> Atte.
> Héctor Balanzar
> hbalanzar(at)gnovus(dot)com
> #ICQ: 26387957
>
> > ----- Original Message -----
> > From: "anderson gutierrez pizarro" <andergp(at)aloccidente(dot)com>
> > To: <pgsql-ayuda(at)tlali(dot)iztacala(dot)unam(dot)mx>
> > Sent: Monday, February 19, 2001 3:54 PM
> > Subject: [pgsql-ayuda] Ayuda
> >
> >
> > > Buenos dias lista.
> > > Tengo el siguiente problema .
> > > cuatro tablas
> > > uno dos tres
> > > x y z
> > >
> > > deseo tener una cuarta tabla con los datos de uno+dos+tres
> > > cuatro
> > > xyz
> > > sin que en algun caso los datos de la uno,dos,tres se repitan en la
> > > cuatro.
> > >
> > > gracias lista por la ayuda prestada.
> > >
> > >
> > > anderson
>
> --------- Pie de mensaje -------------------------------------------
> Archivo historico: http://tlali.iztacala.unam.mx/maillist/pgsql-ayuda
> Cancelar inscripcion:
> mail to: majordomo(at)tlali(dot)iztacala(dot)unam(dot)mx
> text : unsubscribe pgsql-ayuda

Gracias por la respuesta lo que necesito es esto.
tengo las siguientes tablas

l01g1005
701
702
703
704

l02g1005
701
705
706
707

l03g1005
702
708
709
710

la cuarta tabla debe quedar

resultado
701
702
703
704
705
706
707
708
709
710

gracias espero que con esta explicacion quede mas claro gracias lista

--------- Pie de mensaje -------------------------------------------
Archivo historico: http://tlali.iztacala.unam.mx/maillist/pgsql-ayuda
Cancelar inscripcion:
mail to: majordomo(at)tlali(dot)iztacala(dot)unam(dot)mx
text : unsubscribe pgsql-ayuda

>From pgsql-ayuda-owner Mon Feb 19 15:04:45 2001
X-Mozilla-Status: 0011
X-Mozilla-Status2: 00000000
Return-Path: <pgsql-ayuda-owner>
Received: (from majordomo(at)localhost)
by tlali.iztacala.unam.mx (8.11.0/8.11.0) id f1JL4jo22538
for pgsql-ayuda-outgoing; Mon, 19 Feb 2001 15:04:45 -0600
X-Authentication-Warning: tlali.iztacala.unam.mx: majordomo set sender to owner-pgsql-ayuda(at)tlali(dot)iztacala(dot)unam(dot)mx using -f
Received: from dg.aloccidente.com (IDENT:root(at)dg(dot)aloccidente(dot)com [63.65.214.82])
by tlali.iztacala.unam.mx (8.11.0/8.11.0) with ESMTP id f1JL4YA22535
for <pgsql-ayuda(at)tlali(dot)iztacala(dot)unam(dot)mx>; Mon, 19 Feb 2001 15:04:35 -0600
Received: from aloccidente.com (andergp(at)auxsist(dot)aloccidente(dot)com [192.168.0.19])
by dg.aloccidente.com (8.8.7/8.8.7) with ESMTP id OAA09082
for <pgsql-ayuda(at)tlali(dot)iztacala(dot)unam(dot)mx>; Mon, 19 Feb 2001 14:58:54 -0500
Message-ID: <3A918F27(dot)FA941F9(at)aloccidente(dot)com>
Date: Mon, 19 Feb 2001 16:24:55 -0500
From: anderson gutierrez pizarro <andergp(at)aloccidente(dot)com>
X-Mailer: Mozilla 4.72 [es] (X11; U; Linux 2.2.14-5.0 i686)
X-Accept-Language: es
MIME-Version: 1.0
To: pgsql-ayuda(at)tlali(dot)iztacala(dot)unam(dot)mx
Subject: Re: [pgsql-ayuda] Ayuda
References: <3A91339A(dot)A5700EEB(at)aloccidente(dot)com> <000d01c09a8a$bf6cd940$07649680(at)128(dot)150(dot)100(dot)7>
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
Sender: owner-pgsql-ayuda(at)tlali(dot)iztacala(dot)unam(dot)mx
Precedence: bulk
Reply-To: pgsql-ayuda
Content-Length: 1588
Lines: 56

Jose Muro escribió:

> Buenas tardes.
>
> Exactamente que quieres decir con uno+dos+tres
>
> Que se combinen todos los campos de las tablas y no haya ninguno repetido
>
> O que combine los datos por filas sin que se repita ninguno.
>
> Un saludo. José
>
> ----- Original Message -----
> From: "anderson gutierrez pizarro" <andergp(at)aloccidente(dot)com>
> To: <pgsql-ayuda(at)tlali(dot)iztacala(dot)unam(dot)mx>
> Sent: Monday, February 19, 2001 3:54 PM
> Subject: [pgsql-ayuda] Ayuda
>
> > Buenos dias lista.
> > Tengo el siguiente problema .
> > cuatro tablas
> > uno dos tres
> > x y z
> >
> > deseo tener una cuarta tabla con los datos de uno+dos+tres
> > cuatro
> > xyz
> > sin que en algun caso los datos de la uno,dos,tres se repitan en la
> > cuatro.
> >
> > gracias lista por la ayuda prestada.
> >
> >
> > anderson
> >
> > --------- Pie de mensaje -------------------------------------------
> > Archivo historico: http://tlali.iztacala.unam.mx/maillist/pgsql-ayuda
> > Cancelar inscripcion:
> > mail to: majordomo(at)tlali(dot)iztacala(dot)unam(dot)mx
> > text : unsubscribe pgsql-ayuda
> >
>
> --------- Pie de mensaje -------------------------------------------
> Archivo historico: http://tlali.iztacala.unam.mx/maillist/pgsql-ayuda
> Cancelar inscripcion:
> mail to: majordomo(at)tlali(dot)iztacala(dot)unam(dot)mx
> text : unsubscribe pgsql-ayuda

--------- Pie de mensaje -------------------------------------------
Archivo historico: http://tlali.iztacala.unam.mx/maillist/pgsql-ayuda
Cancelar inscripcion:
mail to: majordomo(at)tlali(dot)iztacala(dot)unam(dot)mx
text : unsubscribe pgsql-ayuda

>From pgsql-ayuda-owner Mon Feb 19 15:05:40 2001
X-Mozilla-Status: 0011
X-Mozilla-Status2: 00000000
Return-Path: <pgsql-ayuda-owner>
Received: (from majordomo(at)localhost)
by tlali.iztacala.unam.mx (8.11.0/8.11.0) id f1JL5ep22549
for pgsql-ayuda-outgoing; Mon, 19 Feb 2001 15:05:40 -0600
X-Authentication-Warning: tlali.iztacala.unam.mx: majordomo set sender to owner-pgsql-ayuda(at)tlali(dot)iztacala(dot)unam(dot)mx using -f
Received: from dg.aloccidente.com (IDENT:root(at)dg(dot)aloccidente(dot)com [63.65.214.82])
by tlali.iztacala.unam.mx (8.11.0/8.11.0) with ESMTP id f1JL5WA22546
for <pgsql-ayuda(at)tlali(dot)iztacala(dot)unam(dot)mx>; Mon, 19 Feb 2001 15:05:33 -0600
Received: from aloccidente.com (andergp(at)auxsist(dot)aloccidente(dot)com [192.168.0.19])
by dg.aloccidente.com (8.8.7/8.8.7) with ESMTP id OAA09092
for <pgsql-ayuda(at)tlali(dot)iztacala(dot)unam(dot)mx>; Mon, 19 Feb 2001 14:59:54 -0500
Message-ID: <3A918F63(dot)253A5E74(at)aloccidente(dot)com>
Date: Mon, 19 Feb 2001 16:25:55 -0500
From: anderson gutierrez pizarro <andergp(at)aloccidente(dot)com>
X-Mailer: Mozilla 4.72 [es] (X11; U; Linux 2.2.14-5.0 i686)
X-Accept-Language: es
MIME-Version: 1.0
To: pgsql-ayuda(at)tlali(dot)iztacala(dot)unam(dot)mx
Subject: Re: [pgsql-ayuda] Ayuda
References: <3A91339A(dot)A5700EEB(at)aloccidente(dot)com> <000d01c09a8a$bf6cd940$07649680(at)128(dot)150(dot)100(dot)7>
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
Sender: owner-pgsql-ayuda(at)tlali(dot)iztacala(dot)unam(dot)mx
Precedence: bulk
Reply-To: pgsql-ayuda
Content-Length: 1899
Lines: 96

Jose Muro escribió:

> Buenas tardes.
>
> Exactamente que quieres decir con uno+dos+tres
>
> Que se combinen todos los campos de las tablas y no haya ninguno repetido
>
> O que combine los datos por filas sin que se repita ninguno.
>
> Un saludo. José
>
> ----- Original Message -----
> From: "anderson gutierrez pizarro" <andergp(at)aloccidente(dot)com>
> To: <pgsql-ayuda(at)tlali(dot)iztacala(dot)unam(dot)mx>
> Sent: Monday, February 19, 2001 3:54 PM
> Subject: [pgsql-ayuda] Ayuda
>
> > Buenos dias lista.
> > Tengo el siguiente problema .
> > cuatro tablas
> > uno dos tres
> > x y z
> >
> > deseo tener una cuarta tabla con los datos de uno+dos+tres
> > cuatro
> > xyz
> > sin que en algun caso los datos de la uno,dos,tres se repitan en la
> > cuatro.
> >
> > gracias lista por la ayuda prestada.
> >
> >
> > anderson
> >
> > --------- Pie de mensaje -------------------------------------------
> > Archivo historico: http://tlali.iztacala.unam.mx/maillist/pgsql-ayuda
> > Cancelar inscripcion:
> > mail to: majordomo(at)tlali(dot)iztacala(dot)unam(dot)mx
> > text : unsubscribe pgsql-ayuda
> >
>
> --------- Pie de mensaje -------------------------------------------
> Archivo historico: http://tlali.iztacala.unam.mx/maillist/pgsql-ayuda
> Cancelar inscripcion:
> mail to: majordomo(at)tlali(dot)iztacala(dot)unam(dot)mx
> text : unsubscribe pgsql-ayuda

Gracias por la respuesta lo que necesito es esto.
tengo las siguientes tablas

l01g1005
701
702
703
704

l02g1005
701
705
706
707

l03g1005
702
708
709
710

la cuarta tabla debe quedar

resultado
701
702
703
704
705
706
707
708
709
710

gracias espero que con esta explicacion quede mas claro gracias lista

--------- Pie de mensaje -------------------------------------------
Archivo historico: http://tlali.iztacala.unam.mx/maillist/pgsql-ayuda
Cancelar inscripcion:
mail to: majordomo(at)tlali(dot)iztacala(dot)unam(dot)mx
text : unsubscribe pgsql-ayuda

>From pgsql-ayuda-owner Mon Feb 19 15:05:56 2001
X-Mozilla-Status: 0011
X-Mozilla-Status2: 00000000
Return-Path: <pgsql-ayuda-owner>
Received: (from majordomo(at)localhost)
by tlali.iztacala.unam.mx (8.11.0/8.11.0) id f1JL5ue22554
for pgsql-ayuda-outgoing; Mon, 19 Feb 2001 15:05:56 -0600
X-Authentication-Warning: tlali.iztacala.unam.mx: majordomo set sender to owner-pgsql-ayuda(at)tlali(dot)iztacala(dot)unam(dot)mx using -f
Received: from dg.aloccidente.com (dg.aloccidente.com [63.65.214.82])
by tlali.iztacala.unam.mx (8.11.0/8.11.0) with ESMTP id f1JL5nA22551
for <pgsql-ayuda(at)tlali(dot)iztacala(dot)unam(dot)mx>; Mon, 19 Feb 2001 15:05:50 -0600
Received: from aloccidente.com (andergp(at)auxsist(dot)aloccidente(dot)com [192.168.0.19])
by dg.aloccidente.com (8.8.7/8.8.7) with ESMTP id PAA09098
for <pgsql-ayuda(at)tlali(dot)iztacala(dot)unam(dot)mx>; Mon, 19 Feb 2001 15:00:04 -0500
Message-ID: <3A918F6D(dot)35470919(at)aloccidente(dot)com>
Date: Mon, 19 Feb 2001 16:26:05 -0500
From: anderson gutierrez pizarro <andergp(at)aloccidente(dot)com>
X-Mailer: Mozilla 4.72 [es] (X11; U; Linux 2.2.14-5.0 i686)
X-Accept-Language: es
MIME-Version: 1.0
To: pgsql-ayuda(at)tlali(dot)iztacala(dot)unam(dot)mx
Subject: Re: [pgsql-ayuda] Ayuda
References: <3A91339A(dot)A5700EEB(at)aloccidente(dot)com>
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
Sender: owner-pgsql-ayuda(at)tlali(dot)iztacala(dot)unam(dot)mx
Precedence: bulk
Reply-To: pgsql-ayuda
Content-Length: 1239
Lines: 69

anderson gutierrez pizarro escribió:

> Buenos dias lista.
> Tengo el siguiente problema .
> cuatro tablas
> uno dos tres
> x y z
>
> deseo tener una cuarta tabla con los datos de uno+dos+tres
> cuatro
> xyz
> sin que en algun caso los datos de la uno,dos,tres se repitan en la
> cuatro.
> Gracias por la respuesta lo que necesito es esto.
> tengo las siguientes tablas
>
> l01g1005
> 701
> 702
> 703
> 704
>
> l02g1005
> 701
> 705
> 706
> 707
>
> l03g1005
> 702
> 708
> 709
> 710
>
> la cuarta tabla debe quedar
>
> resultado
> 701
> 702
> 703
> 704
> 705
> 706
> 707
> 708
> 709
> 710
>
> gracias espero que con esta explicacion quede mas claro gracias lista
>
>
>
>
> gracias lista por la ayuda prestada.
>
> anderson
>
> --------- Pie de mensaje -------------------------------------------
> Archivo historico: http://tlali.iztacala.unam.mx/maillist/pgsql-ayuda
> Cancelar inscripcion:
> mail to: majordomo(at)tlali(dot)iztacala(dot)unam(dot)mx
> text : unsubscribe pgsql-ayuda

--------- Pie de mensaje -------------------------------------------
Archivo historico: http://tlali.iztacala.unam.mx/maillist/pgsql-ayuda
Cancelar inscripcion:
mail to: majordomo(at)tlali(dot)iztacala(dot)unam(dot)mx
text : unsubscribe pgsql-ayuda

>From pgsql-ayuda-owner Mon Feb 19 16:38:50 2001
X-Mozilla-Status: 0011
X-Mozilla-Status2: 00000000
Return-Path: <pgsql-ayuda-owner>
Received: (from majordomo(at)localhost)
by tlali.iztacala.unam.mx (8.11.0/8.11.0) id f1JMco923191
for pgsql-ayuda-outgoing; Mon, 19 Feb 2001 16:38:50 -0600
X-Authentication-Warning: tlali.iztacala.unam.mx: majordomo set sender to owner-pgsql-ayuda(at)tlali(dot)iztacala(dot)unam(dot)mx using -f
Received: from smtp.prodigy.net.mx (dfproxy01.prodigy.net.mx [148.235.168.56] (may be forged))
by tlali.iztacala.unam.mx (8.11.0/8.11.0) with ESMTP id f1JMcjA23188
for <pgsql-ayuda(at)tlali(dot)iztacala(dot)unam(dot)mx>; Mon, 19 Feb 2001 16:38:46 -0600
Received: from aquarius (du-148-221-104-39.prodigy.net.mx [148.221.104.39])
by SMTP.Prodigy.Net.mx (Sun Internet Mail Server sims.4.0.2000.05.17.04.13.p6)
with SMTP id <0G910026O0709C(at)SMTP(dot)Prodigy(dot)Net(dot)mx>; Mon,
19 Feb 2001 16:37:49 -0600 (CST)
Date: Mon, 19 Feb 2001 16:41:45 -0600
From: =?iso-8859-1?Q?H=E9ctor_Balanzar?= <hbalanzar(at)gnovus(dot)com>
Subject: Re: [pgsql-ayuda] Ayuda
To: pgsql-ayuda(at)tlali(dot)iztacala(dot)unam(dot)mx
Message-id: <00d901c09ac5$236e4d40$0342a8c0(at)aquarius>
MIME-version: 1.0
X-MIMEOLE: Produced By Microsoft MimeOLE V5.00.2919.6700
X-Mailer: Microsoft Outlook Express 5.00.2919.6700
Content-type: text/plain; charset=iso-8859-1
Content-transfer-encoding: 8BIT
X-Priority: 3
X-MSMail-priority: Normal
References: <3A91339A(dot)A5700EEB(at)aloccidente(dot)com>
<000d01c09a8a$bf6cd940$07649680(at)128(dot)150(dot)100(dot)7>
<3A918F63(dot)253A5E74(at)aloccidente(dot)com>
Sender: owner-pgsql-ayuda(at)tlali(dot)iztacala(dot)unam(dot)mx
Precedence: bulk
Reply-To: pgsql-ayuda
Content-Length: 483
Lines: 17

Para información más detallada de postgres:

http://www.postgresql.org/docs/aw_pgsql_book/index.html

info en español.....(no la he leido....pero te recomiendo uses la info en
inglés)

http://users.servicios.retecal.es/rsantos/
Héctor Balanzar

--------- Pie de mensaje -------------------------------------------
Archivo historico: http://tlali.iztacala.unam.mx/maillist/pgsql-ayuda
Cancelar inscripcion:
mail to: majordomo(at)tlali(dot)iztacala(dot)unam(dot)mx
text : unsubscribe pgsql-ayuda

>From pgsql-ayuda-owner Mon Feb 19 16:48:47 2001
X-Mozilla-Status: 0011
X-Mozilla-Status2: 00000000
Return-Path: <pgsql-ayuda-owner>
Received: (from majordomo(at)localhost)
by tlali.iztacala.unam.mx (8.11.0/8.11.0) id f1JMmlR23256
for pgsql-ayuda-outgoing; Mon, 19 Feb 2001 16:48:47 -0600
X-Authentication-Warning: tlali.iztacala.unam.mx: majordomo set sender to owner-pgsql-ayuda(at)tlali(dot)iztacala(dot)unam(dot)mx using -f
Received: from smtp.prodigy.net.mx (dfproxy00.prodigy.net.mx [148.235.168.49] (may be forged))
by tlali.iztacala.unam.mx (8.11.0/8.11.0) with ESMTP id f1JMmkA23253
for <pgsql-ayuda(at)tlali(dot)iztacala(dot)unam(dot)mx>; Mon, 19 Feb 2001 16:48:46 -0600
Received: from aquarius (du-148-221-104-39.prodigy.net.mx [148.221.104.39])
by SMTP.Prodigy.Net.mx (Sun Internet Mail Server sims.4.0.2000.05.17.04.13.p6)
with SMTP id <0G9000226ZXJYN(at)SMTP(dot)Prodigy(dot)Net(dot)mx>; Mon,
19 Feb 2001 16:32:18 -0600 (CST)
Date: Mon, 19 Feb 2001 16:34:27 -0600
From: =?iso-8859-1?Q?H=E9ctor_Balanzar?= <hbalanzar(at)gnovus(dot)com>
Subject: Re: [pgsql-ayuda] Ayuda
To: pgsql-ayuda(at)tlali(dot)iztacala(dot)unam(dot)mx
Message-id: <00d501c09ac4$2445b6f0$0342a8c0(at)aquarius>
MIME-version: 1.0
X-MIMEOLE: Produced By Microsoft MimeOLE V5.00.2919.6700
X-Mailer: Microsoft Outlook Express 5.00.2919.6700
Content-type: text/plain; charset=iso-8859-1
Content-transfer-encoding: 8BIT
X-Priority: 3
X-MSMail-priority: Normal
References: <3A91339A(dot)A5700EEB(at)aloccidente(dot)com>
<000d01c09a8a$bf6cd940$07649680(at)128(dot)150(dot)100(dot)7>
<3A918F63(dot)253A5E74(at)aloccidente(dot)com>
Sender: owner-pgsql-ayuda(at)tlali(dot)iztacala(dot)unam(dot)mx
Precedence: bulk
Reply-To: pgsql-ayuda
Content-Length: 1181
Lines: 68

Anderson:
De acuerdo a la salida que quieres es:

SELECT campo from tabla_uno UNION SELECT campo FROM tabla_dos UNION SELECT
campo FROM tabla_tres;

Nota: Los datos deben ser del mismo tipo.

Para mayor información sobre postgres y select visita:
http://www.postgresql.org/users-lounge/docs/7.0/tutorial/

> Gracias por la respuesta lo que necesito es esto.
> tengo las siguientes tablas
>
> l01g1005
> 701
> 702
> 703
> 704
>
> l02g1005
> 701
> 705
> 706
> 707
>
> l03g1005
> 702
> 708
> 709
> 710
>
> la cuarta tabla debe quedar
>
> resultado
> 701
> 702
> 703
> 704
> 705
> 706
> 707
> 708
> 709
> 710
>
> gracias espero que con esta explicacion quede mas claro gracias lista
>
>
>
>
>
>
> --------- Pie de mensaje -------------------------------------------
> Archivo historico: http://tlali.iztacala.unam.mx/maillist/pgsql-ayuda
> Cancelar inscripcion:
> mail to: majordomo(at)tlali(dot)iztacala(dot)unam(dot)mx
> text : unsubscribe pgsql-ayuda
>
>

--------- Pie de mensaje -------------------------------------------
Archivo historico: http://tlali.iztacala.unam.mx/maillist/pgsql-ayuda
Cancelar inscripcion:
mail to: majordomo(at)tlali(dot)iztacala(dot)unam(dot)mx
text : unsubscribe pgsql-ayuda

>From pgsql-ayuda-owner Mon Feb 19 18:07:53 2001
X-Mozilla-Status: 0001
X-Mozilla-Status2: 00000000
Return-Path: <pgsql-ayuda-owner>
Received: (from majordomo(at)localhost)
by tlali.iztacala.unam.mx (8.11.0/8.11.0) id f1K07r323807
for pgsql-ayuda-outgoing; Mon, 19 Feb 2001 18:07:53 -0600
X-Authentication-Warning: tlali.iztacala.unam.mx: majordomo set sender to owner-pgsql-ayuda(at)tlali(dot)iztacala(dot)unam(dot)mx using -f
Received: from mail.sni.org.pe (mail.sni.org.pe [200.48.19.67])
by tlali.iztacala.unam.mx (8.11.0/8.11.0) with ESMTP id f1K07eA23798
for <pgsql-ayuda(at)tlali(dot)iztacala(dot)unam(dot)mx>; Mon, 19 Feb 2001 18:07:47 -0600
Received: from sni.org.pe (IDENT:nobody(at)mail(dot)sni(dot)org(dot)pe [127.0.0.1])
by mail.sni.org.pe (8.9.3/8.9.3) with SMTP id RAA29410
for <pgsql-ayuda(at)tlali(dot)iztacala(dot)unam(dot)mx>; Mon, 19 Feb 2001 17:16:01 -0500
Received: from 192.168.1.1 (proxying for 192.168.1.43)
(SquirrelMail authenticated user marcodtup)
by www.sni.org.pe with HTTP;
Mon, 19 Feb 2001 17:16:01 -0500 (PET)
Message-ID: <4347(dot)192(dot)168(dot)1(dot)1(dot)982620961(dot)squirrel(at)www(dot)sni(dot)org(dot)pe>
Date: Mon, 19 Feb 2001 17:16:01 -0500 (PET)
Subject: [pgsql-ayuda] URGENTE ...!! STORE PROCEDURE
From: "Marco De La Torre Ugarte P." <marco(at)sni(dot)org(dot)pe>
To: pgsql-ayuda(at)tlali(dot)iztacala(dot)unam(dot)mx
In-Reply-To: <00d501c09ac4$2445b6f0$0342a8c0(at)aquarius>
References: <00d501c09ac4$2445b6f0$0342a8c0(at)aquarius>
X-Mailer: SquirrelMail (version 0.5)
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
Sender: owner-pgsql-ayuda(at)tlali(dot)iztacala(dot)unam(dot)mx
Precedence: bulk
Reply-To: pgsql-ayuda
Content-Length: 1928
Lines: 94

COMO PUEDO UTILIZAR STORE PROCEDURE EN POSTGRES...POR FAVOR
ES VERY IMPORT... SI ES POSIBLE ENVIENME UN EJEMPLO-.-

MUCHAS GRACIAS.

> Anderson:
> De acuerdo a la salida que quieres es:
>
>
> SELECT campo from tabla_uno UNION SELECT campo FROM
tabla_dos UNION SELECT
> campo FROM tabla_tres;
>
> Nota: Los datos deben ser del mismo tipo.
>
> Para mayor información sobre postgres y select visita:
> http://www.postgresql.org/users-lounge/docs/7.0/tutorial/
>
> > Gracias por la respuesta lo que necesito es esto.
> > tengo las siguientes tablas
> >
> > l01g1005
> > 701
> > 702
> > 703
> > 704
> >
> > l02g1005
> > 701
> > 705
> > 706
> > 707
> >
> > l03g1005
> > 702
> > 708
> > 709
> > 710
> >
> > la cuarta tabla debe quedar
> >
> > resultado
> > 701
> > 702
> > 703
> > 704
> > 705
> > 706
> > 707
> > 708
> > 709
> > 710
> >
> > gracias espero que con esta explicacion quede mas claro
gracias lista
> >
> >
> >
> >
> >
> >
> > --------- Pie de mensaje -------------------------------
------------
> > Archivo historico:
http://tlali.iztacala.unam.mx/maillist/pgsql-ayuda
> > Cancelar inscripcion:
> > mail to: majordomo(at)tlali(dot)iztacala(dot)unam(dot)mx
> > text : unsubscribe pgsql-ayuda
> >
> >
>
> --------- Pie de mensaje ---------------------------------
----------
> Archivo historico:
http://tlali.iztacala.unam.mx/maillist/pgsql-ayuda
> Cancelar inscripcion:
> mail to: majordomo(at)tlali(dot)iztacala(dot)unam(dot)mx
> text : unsubscribe pgsql-ayuda
>

--
Marco A. De La Torre Ugarte Pittman __o
Sociedad Nacional de Industrias ---_ \<,_
4218830 - 249 / 902-9268 ---(_)/ (_)
http://www.linux.org.pe/anuncios.html
Los acentos han sido omitidos intencionalmente.

--------- Pie de mensaje -------------------------------------------
Archivo historico: http://tlali.iztacala.unam.mx/maillist/pgsql-ayuda
Cancelar inscripcion:
mail to: majordomo(at)tlali(dot)iztacala(dot)unam(dot)mx
text : unsubscribe pgsql-ayuda

>From pgsql-ayuda-owner Tue Feb 20 07:36:53 2001
X-Mozilla-Status: 0011
X-Mozilla-Status2: 00000000
Return-Path: <pgsql-ayuda-owner>
Received: (from majordomo(at)localhost)
by tlali.iztacala.unam.mx (8.11.0/8.11.0) id f1KDara26771
for pgsql-ayuda-outgoing; Tue, 20 Feb 2001 07:36:53 -0600
X-Authentication-Warning: tlali.iztacala.unam.mx: majordomo set sender to owner-pgsql-ayuda(at)tlali(dot)iztacala(dot)unam(dot)mx using -f
Received: from dg.aloccidente.com (IDENT:root(at)dg(dot)aloccidente(dot)com [63.65.214.82])
by tlali.iztacala.unam.mx (8.11.0/8.11.0) with ESMTP id f1KDamf26768
for <pgsql-ayuda(at)tlali(dot)iztacala(dot)unam(dot)mx>; Tue, 20 Feb 2001 07:36:49 -0600
Received: from aloccidente.com (andergp(at)auxsist(dot)aloccidente(dot)com [192.168.0.19])
by dg.aloccidente.com (8.8.7/8.8.7) with ESMTP id HAA16186
for <pgsql-ayuda(at)tlali(dot)iztacala(dot)unam(dot)mx>; Tue, 20 Feb 2001 07:31:11 -0500
Message-ID: <3A9277B9(dot)2E49FB8D(at)aloccidente(dot)com>
Date: Tue, 20 Feb 2001 08:57:13 -0500
From: anderson gutierrez pizarro <andergp(at)aloccidente(dot)com>
X-Mailer: Mozilla 4.72 [es] (X11; U; Linux 2.2.14-5.0 i686)
X-Accept-Language: es
MIME-Version: 1.0
To: pgsql-ayuda(at)tlali(dot)iztacala(dot)unam(dot)mx
Subject: Re: [pgsql-ayuda] Ayuda
References: <3A91339A(dot)A5700EEB(at)aloccidente(dot)com>
<000d01c09a8a$bf6cd940$07649680(at)128(dot)150(dot)100(dot)7>
<3A918F63(dot)253A5E74(at)aloccidente(dot)com> <00d501c09ac4$2445b6f0$0342a8c0(at)aquarius>
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
Sender: owner-pgsql-ayuda(at)tlali(dot)iztacala(dot)unam(dot)mx
Precedence: bulk
Reply-To: pgsql-ayuda
Content-Length: 1693
Lines: 79

Héctor Balanzar escribió:

> Anderson:
> De acuerdo a la salida que quieres es:
>
> SELECT campo from tabla_uno UNION SELECT campo FROM tabla_dos UNION SELECT
> campo FROM tabla_tres;
>
> Nota: Los datos deben ser del mismo tipo.
>
> Para mayor información sobre postgres y select visita:
> http://www.postgresql.org/users-lounge/docs/7.0/tutorial/
>
> > Gracias por la respuesta lo que necesito es esto.
> > tengo las siguientes tablas
> >
> > l01g1005
> > 701
> > 702
> > 703
> > 704
> >
> > l02g1005
> > 701
> > 705
> > 706
> > 707
> >
> > l03g1005
> > 702
> > 708
> > 709
> > 710
> >
> > la cuarta tabla debe quedar
> >
> > resultado
> > 701
> > 702
> > 703
> > 704
> > 705
> > 706
> > 707
> > 708
> > 709
> > 710
> >
> > gracias espero que con esta explicacion quede mas claro gracias lista
> >
> >
> >
> >
> >
> >
> > --------- Pie de mensaje -------------------------------------------
> > Archivo historico: http://tlali.iztacala.unam.mx/maillist/pgsql-ayuda
> > Cancelar inscripcion:
> > mail to: majordomo(at)tlali(dot)iztacala(dot)unam(dot)mx
> > text : unsubscribe pgsql-ayuda
> >
> >
>
> --------- Pie de mensaje -------------------------------------------
> Archivo historico: http://tlali.iztacala.unam.mx/maillist/pgsql-ayuda
> Cancelar inscripcion:
> mail to: majordomo(at)tlali(dot)iztacala(dot)unam(dot)mx
> text : unsubscribe pgsql-ayuda

Hola Héctor Balanzar
Muy bien por el comando pero necesito que se cree fisicamente la tabla no que
sea un query gracias.

--------- Pie de mensaje -------------------------------------------
Archivo historico: http://tlali.iztacala.unam.mx/maillist/pgsql-ayuda
Cancelar inscripcion:
mail to: majordomo(at)tlali(dot)iztacala(dot)unam(dot)mx
text : unsubscribe pgsql-ayuda

>From pgsql-ayuda-owner Tue Feb 20 09:14:07 2001
X-Mozilla-Status: 0011
X-Mozilla-Status2: 00000000
Return-Path: <pgsql-ayuda-owner>
Received: (from majordomo(at)localhost)
by tlali.iztacala.unam.mx (8.11.0/8.11.0) id f1KFE7927107
for pgsql-ayuda-outgoing; Tue, 20 Feb 2001 09:14:07 -0600
X-Authentication-Warning: tlali.iztacala.unam.mx: majordomo set sender to owner-pgsql-ayuda(at)tlali(dot)iztacala(dot)unam(dot)mx using -f
Received: from janus ([195.57.248.4])
by tlali.iztacala.unam.mx (8.11.0/8.11.0) with ESMTP id f1KFDHf27104
for <pgsql-ayuda(at)tlali(dot)iztacala(dot)unam(dot)mx>; Tue, 20 Feb 2001 09:14:05 -0600
Received: from pere (unverified [195.57.248.239]) by janus
(Rockliffe SMTPRA 2.1.7) with SMTP id <B0000152189(at)janus> for <pgsql-ayuda(at)tlali(dot)iztacala(dot)unam(dot)mx>;
Tue, 20 Feb 2001 16:16:01 +0100
Message-ID: <001201c09b50$007bdba0$07649680(at)128(dot)150(dot)100(dot)7>
From: "Jose Muro" <jomupe(at)sicon(dot)net>
To: <pgsql-ayuda(at)tlali(dot)iztacala(dot)unam(dot)mx>
References: <3A91339A(dot)A5700EEB(at)aloccidente(dot)com> <000d01c09a8a$bf6cd940$07649680(at)128(dot)150(dot)100(dot)7> <3A918F63(dot)253A5E74(at)aloccidente(dot)com> <00d501c09ac4$2445b6f0$0342a8c0(at)aquarius> <3A9277B9(dot)2E49FB8D(at)aloccidente(dot)com>
Subject: Re: [pgsql-ayuda] Ayuda
Date: Tue, 20 Feb 2001 16:15:45 +0100
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 8bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.50.4133.2400
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
Sender: owner-pgsql-ayuda(at)tlali(dot)iztacala(dot)unam(dot)mx
Precedence: bulk
Reply-To: pgsql-ayuda
Content-Length: 2597
Lines: 105

No se si es posible crear la tabla desde la SELECT en POSTGRES.

Lo que si puedes hacer es teniendo la tabla creada insertar los datos de la
consulta mediante

INSERT INTO tabla_a_rellenar SELECT campo from tabla_uno UNION SELECT campo
FROM tabla_dos UNION SELECT campo FROM tabla_tres

Un saludo. José

----- Original Message -----
From: "anderson gutierrez pizarro" <andergp(at)aloccidente(dot)com>
To: <pgsql-ayuda(at)tlali(dot)iztacala(dot)unam(dot)mx>
Sent: Tuesday, February 20, 2001 2:57 PM
Subject: Re: [pgsql-ayuda] Ayuda

> Héctor Balanzar escribió:
>
> > Anderson:
> > De acuerdo a la salida que quieres es:
> >
> > SELECT campo from tabla_uno UNION SELECT campo FROM tabla_dos UNION
SELECT
> > campo FROM tabla_tres;
> >
> > Nota: Los datos deben ser del mismo tipo.
> >
> > Para mayor información sobre postgres y select visita:
> > http://www.postgresql.org/users-lounge/docs/7.0/tutorial/
> >
> > > Gracias por la respuesta lo que necesito es esto.
> > > tengo las siguientes tablas
> > >
> > > l01g1005
> > > 701
> > > 702
> > > 703
> > > 704
> > >
> > > l02g1005
> > > 701
> > > 705
> > > 706
> > > 707
> > >
> > > l03g1005
> > > 702
> > > 708
> > > 709
> > > 710
> > >
> > > la cuarta tabla debe quedar
> > >
> > > resultado
> > > 701
> > > 702
> > > 703
> > > 704
> > > 705
> > > 706
> > > 707
> > > 708
> > > 709
> > > 710
> > >
> > > gracias espero que con esta explicacion quede mas claro gracias lista
> > >
> > >
> > >
> > >
> > >
> > >
> > > --------- Pie de mensaje -------------------------------------------
> > > Archivo historico: http://tlali.iztacala.unam.mx/maillist/pgsql-ayuda
> > > Cancelar inscripcion:
> > > mail to: majordomo(at)tlali(dot)iztacala(dot)unam(dot)mx
> > > text : unsubscribe pgsql-ayuda
> > >
> > >
> >
> > --------- Pie de mensaje -------------------------------------------
> > Archivo historico: http://tlali.iztacala.unam.mx/maillist/pgsql-ayuda
> > Cancelar inscripcion:
> > mail to: majordomo(at)tlali(dot)iztacala(dot)unam(dot)mx
> > text : unsubscribe pgsql-ayuda
>
> Hola Héctor Balanzar
> Muy bien por el comando pero necesito que se cree fisicamente la tabla no
que
> sea un query gracias.
>
> --------- Pie de mensaje -------------------------------------------
> Archivo historico: http://tlali.iztacala.unam.mx/maillist/pgsql-ayuda
> Cancelar inscripcion:
> mail to: majordomo(at)tlali(dot)iztacala(dot)unam(dot)mx
> text : unsubscribe pgsql-ayuda
>

--------- Pie de mensaje -------------------------------------------
Archivo historico: http://tlali.iztacala.unam.mx/maillist/pgsql-ayuda
Cancelar inscripcion:
mail to: majordomo(at)tlali(dot)iztacala(dot)unam(dot)mx
text : unsubscribe pgsql-ayuda

>From pgsql-ayuda-owner Tue Feb 20 09:22:22 2001
X-Mozilla-Status: 0011
X-Mozilla-Status2: 00000000
Return-Path: <pgsql-ayuda-owner>
Received: (from majordomo(at)localhost)
by tlali.iztacala.unam.mx (8.11.0/8.11.0) id f1KFMMF27136
for pgsql-ayuda-outgoing; Tue, 20 Feb 2001 09:22:22 -0600
X-Authentication-Warning: tlali.iztacala.unam.mx: majordomo set sender to owner-pgsql-ayuda(at)tlali(dot)iztacala(dot)unam(dot)mx using -f
Received: from janus ([195.57.248.4])
by tlali.iztacala.unam.mx (8.11.0/8.11.0) with ESMTP id f1KFMIf27133
for <pgsql-ayuda(at)tlali(dot)iztacala(dot)unam(dot)mx>; Tue, 20 Feb 2001 09:22:19 -0600
Received: from pere (unverified [195.57.248.239]) by janus
(Rockliffe SMTPRA 2.1.7) with SMTP id <B0000152204(at)janus> for <pgsql-ayuda(at)tlali(dot)iztacala(dot)unam(dot)mx>;
Tue, 20 Feb 2001 16:25:11 +0100
Message-ID: <001601c09b51$48a1bf70$07649680(at)128(dot)150(dot)100(dot)7>
From: "Jose Muro" <jomupe(at)sicon(dot)net>
To: <pgsql-ayuda(at)tlali(dot)iztacala(dot)unam(dot)mx>
References: <3A91339A(dot)A5700EEB(at)aloccidente(dot)com> <000d01c09a8a$bf6cd940$07649680(at)128(dot)150(dot)100(dot)7> <3A918F63(dot)253A5E74(at)aloccidente(dot)com> <00d501c09ac4$2445b6f0$0342a8c0(at)aquarius> <3A9277B9(dot)2E49FB8D(at)aloccidente(dot)com>
Subject: Re: [pgsql-ayuda] Ayuda
Date: Tue, 20 Feb 2001 16:24:57 +0100
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 8bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.50.4133.2400
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
Sender: owner-pgsql-ayuda(at)tlali(dot)iztacala(dot)unam(dot)mx
Precedence: bulk
Reply-To: pgsql-ayuda
Content-Length: 2467
Lines: 102

Bueno ya se como se hace

SELECT campo_tabla1 INTO TABLE neva_tabla FROM tabla_1 UNION SELECT
campo_tabla2 FROM tabla2 UNION SELECT campo_tabla3 FROM tabla3

Un saludo. José

----- Original Message -----
From: "anderson gutierrez pizarro" <andergp(at)aloccidente(dot)com>
To: <pgsql-ayuda(at)tlali(dot)iztacala(dot)unam(dot)mx>
Sent: Tuesday, February 20, 2001 2:57 PM
Subject: Re: [pgsql-ayuda] Ayuda

> Héctor Balanzar escribió:
>
> > Anderson:
> > De acuerdo a la salida que quieres es:
> >
> > SELECT campo from tabla_uno UNION SELECT campo FROM tabla_dos UNION
SELECT
> > campo FROM tabla_tres;
> >
> > Nota: Los datos deben ser del mismo tipo.
> >
> > Para mayor información sobre postgres y select visita:
> > http://www.postgresql.org/users-lounge/docs/7.0/tutorial/
> >
> > > Gracias por la respuesta lo que necesito es esto.
> > > tengo las siguientes tablas
> > >
> > > l01g1005
> > > 701
> > > 702
> > > 703
> > > 704
> > >
> > > l02g1005
> > > 701
> > > 705
> > > 706
> > > 707
> > >
> > > l03g1005
> > > 702
> > > 708
> > > 709
> > > 710
> > >
> > > la cuarta tabla debe quedar
> > >
> > > resultado
> > > 701
> > > 702
> > > 703
> > > 704
> > > 705
> > > 706
> > > 707
> > > 708
> > > 709
> > > 710
> > >
> > > gracias espero que con esta explicacion quede mas claro gracias lista
> > >
> > >
> > >
> > >
> > >
> > >
> > > --------- Pie de mensaje -------------------------------------------
> > > Archivo historico: http://tlali.iztacala.unam.mx/maillist/pgsql-ayuda
> > > Cancelar inscripcion:
> > > mail to: majordomo(at)tlali(dot)iztacala(dot)unam(dot)mx
> > > text : unsubscribe pgsql-ayuda
> > >
> > >
> >
> > --------- Pie de mensaje -------------------------------------------
> > Archivo historico: http://tlali.iztacala.unam.mx/maillist/pgsql-ayuda
> > Cancelar inscripcion:
> > mail to: majordomo(at)tlali(dot)iztacala(dot)unam(dot)mx
> > text : unsubscribe pgsql-ayuda
>
> Hola Héctor Balanzar
> Muy bien por el comando pero necesito que se cree fisicamente la tabla no
que
> sea un query gracias.
>
> --------- Pie de mensaje -------------------------------------------
> Archivo historico: http://tlali.iztacala.unam.mx/maillist/pgsql-ayuda
> Cancelar inscripcion:
> mail to: majordomo(at)tlali(dot)iztacala(dot)unam(dot)mx
> text : unsubscribe pgsql-ayuda
>

--------- Pie de mensaje -------------------------------------------
Archivo historico: http://tlali.iztacala.unam.mx/maillist/pgsql-ayuda
Cancelar inscripcion:
mail to: majordomo(at)tlali(dot)iztacala(dot)unam(dot)mx
text : unsubscribe pgsql-ayuda

>From pgsql-ayuda-owner Tue Feb 20 12:57:12 2001
X-Mozilla-Status: 0011
X-Mozilla-Status2: 00000000
Return-Path: <pgsql-ayuda-owner>
Received: (from majordomo(at)localhost)
by tlali.iztacala.unam.mx (8.11.0/8.11.0) id f1KIvC028412
for pgsql-ayuda-outgoing; Tue, 20 Feb 2001 12:57:12 -0600
X-Authentication-Warning: tlali.iztacala.unam.mx: majordomo set sender to owner-pgsql-ayuda(at)tlali(dot)iztacala(dot)unam(dot)mx using -f
Received: from dg.aloccidente.com (dg.aloccidente.com [63.65.214.82])
by tlali.iztacala.unam.mx (8.11.0/8.11.0) with ESMTP id f1KIv7f28409
for <pgsql-ayuda(at)tlali(dot)iztacala(dot)unam(dot)mx>; Tue, 20 Feb 2001 12:57:08 -0600
Received: from aloccidente.com (andergp(at)auxsist(dot)aloccidente(dot)com [192.168.0.19])
by dg.aloccidente.com (8.8.7/8.8.7) with ESMTP id MAA06160
for <pgsql-ayuda(at)tlali(dot)iztacala(dot)unam(dot)mx>; Tue, 20 Feb 2001 12:51:41 -0500
Message-ID: <3A92C2D5(dot)42D119EF(at)aloccidente(dot)com>
Date: Tue, 20 Feb 2001 14:17:41 -0500
From: anderson gutierrez pizarro <andergp(at)aloccidente(dot)com>
X-Mailer: Mozilla 4.72 [es] (X11; U; Linux 2.2.14-5.0 i686)
X-Accept-Language: es
MIME-Version: 1.0
To: pgsql-ayuda(at)tlali(dot)iztacala(dot)unam(dot)mx
Subject: Re: [pgsql-ayuda] Ayuda
References: <3A91339A(dot)A5700EEB(at)aloccidente(dot)com> <000d01c09a8a$bf6cd940$07649680(at)128(dot)150(dot)100(dot)7> <3A918F63(dot)253A5E74(at)aloccidente(dot)com> <00d501c09ac4$2445b6f0$0342a8c0(at)aquarius> <3A9277B9(dot)2E49FB8D(at)aloccidente(dot)com> <001601c09b51$48a1bf70$07649680(at)128(dot)150(dot)100(dot)7>
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
Sender: owner-pgsql-ayuda(at)tlali(dot)iztacala(dot)unam(dot)mx
Precedence: bulk
Reply-To: pgsql-ayuda
Content-Length: 2988
Lines: 111

Jose Muro escribió:

> Bueno ya se como se hace
>
> SELECT campo_tabla1 INTO TABLE neva_tabla FROM tabla_1 UNION SELECT
> campo_tabla2 FROM tabla2 UNION SELECT campo_tabla3 FROM tabla3
>
> Un saludo. José
>
> ----- Original Message -----
> From: "anderson gutierrez pizarro" <andergp(at)aloccidente(dot)com>
> To: <pgsql-ayuda(at)tlali(dot)iztacala(dot)unam(dot)mx>
> Sent: Tuesday, February 20, 2001 2:57 PM
> Subject: Re: [pgsql-ayuda] Ayuda
>
> > Héctor Balanzar escribió:
> >
> > > Anderson:
> > > De acuerdo a la salida que quieres es:
> > >
> > > SELECT campo from tabla_uno UNION SELECT campo FROM tabla_dos UNION
> SELECT
> > > campo FROM tabla_tres;
> > >
> > > Nota: Los datos deben ser del mismo tipo.
> > >
> > > Para mayor información sobre postgres y select visita:
> > > http://www.postgresql.org/users-lounge/docs/7.0/tutorial/
> > >
> > > > Gracias por la respuesta lo que necesito es esto.
> > > > tengo las siguientes tablas
> > > >
> > > > l01g1005
> > > > 701
> > > > 702
> > > > 703
> > > > 704
> > > >
> > > > l02g1005
> > > > 701
> > > > 705
> > > > 706
> > > > 707
> > > >
> > > > l03g1005
> > > > 702
> > > > 708
> > > > 709
> > > > 710
> > > >
> > > > la cuarta tabla debe quedar
> > > >
> > > > resultado
> > > > 701
> > > > 702
> > > > 703
> > > > 704
> > > > 705
> > > > 706
> > > > 707
> > > > 708
> > > > 709
> > > > 710
> > > >
> > > > gracias espero que con esta explicacion quede mas claro gracias lista
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > --------- Pie de mensaje -------------------------------------------
> > > > Archivo historico: http://tlali.iztacala.unam.mx/maillist/pgsql-ayuda
> > > > Cancelar inscripcion:
> > > > mail to: majordomo(at)tlali(dot)iztacala(dot)unam(dot)mx
> > > > text : unsubscribe pgsql-ayuda
> > > >
> > > >
> > >
> > > --------- Pie de mensaje -------------------------------------------
> > > Archivo historico: http://tlali.iztacala.unam.mx/maillist/pgsql-ayuda
> > > Cancelar inscripcion:
> > > mail to: majordomo(at)tlali(dot)iztacala(dot)unam(dot)mx
> > > text : unsubscribe pgsql-ayuda
> >
> > Hola Héctor Balanzar
> > Muy bien por el comando pero necesito que se cree fisicamente la tabla no
> que
> > sea un query gracias.
> >
> > --------- Pie de mensaje -------------------------------------------
> > Archivo historico: http://tlali.iztacala.unam.mx/maillist/pgsql-ayuda
> > Cancelar inscripcion:
> > mail to: majordomo(at)tlali(dot)iztacala(dot)unam(dot)mx
> > text : unsubscribe pgsql-ayuda
> >
>
> --------- Pie de mensaje -------------------------------------------
> Archivo historico: http://tlali.iztacala.unam.mx/maillist/pgsql-ayuda
> Cancelar inscripcion:
> mail to: majordomo(at)tlali(dot)iztacala(dot)unam(dot)mx
> text : unsubscribe pgsql-ayuda

Gracias por tu ayuda logre el objetivo planteado ..........anderson

--------- Pie de mensaje -------------------------------------------
Archivo historico: http://tlali.iztacala.unam.mx/maillist/pgsql-ayuda
Cancelar inscripcion:
mail to: majordomo(at)tlali(dot)iztacala(dot)unam(dot)mx
text : unsubscribe pgsql-ayuda

>From pgsql-ayuda-owner Wed Feb 21 12:09:19 2001
X-Mozilla-Status: 0001
X-Mozilla-Status2: 00000000
Return-Path: <pgsql-ayuda-owner>
Received: (from majordomo(at)localhost)
by tlali.iztacala.unam.mx (8.11.0/8.11.0) id f1LI9JK02341
for pgsql-ayuda-outgoing; Wed, 21 Feb 2001 12:09:19 -0600
X-Authentication-Warning: tlali.iztacala.unam.mx: majordomo set sender to owner-pgsql-ayuda(at)tlali(dot)iztacala(dot)unam(dot)mx using -f
Received: from hotmail.com (f34.law12.hotmail.com [64.4.19.34])
by tlali.iztacala.unam.mx (8.11.0/8.11.0) with ESMTP id f1LI9GC02338
for <pgsql-ayuda(at)tlali(dot)iztacala(dot)unam(dot)mx>; Wed, 21 Feb 2001 12:09:17 -0600
Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC;
Wed, 21 Feb 2001 10:12:20 -0800
Received: from 63.84.236.158 by lw12fd.law12.hotmail.msn.com with HTTP; Wed, 21 Feb 2001 18:12:20 GMT
X-Originating-IP: [63.84.236.158]
From: "Postgres The Best" <postgres99(at)hotmail(dot)com>
To: pgsql-ayuda(at)tlali(dot)iztacala(dot)unam(dot)mx
Date: Wed, 21 Feb 2001 13:12:20 -0500
Mime-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1; format=flowed
Message-ID: <F34MnSK94rhwtCqTyj500004258(at)hotmail(dot)com>
X-OriginalArrivalTime: 21 Feb 2001 18:12:20.0868 (UTC) FILETIME=[D515CC40:01C09C31]
Sender: owner-pgsql-ayuda(at)tlali(dot)iztacala(dot)unam(dot)mx
Precedence: bulk
Reply-To: pgsql-ayuda
Content-Length: 916
Lines: 30

Saludos:

Cuando precompilo la siguiente sentencia:
EXEC SQL SELECT camp_1 INTO :n1 WHERE llave = :var_llave FOR UPDATE;

El precompilador ECPG presenta el mensaje:
"FOR UPDATE is not allowed in this context".

PArece haber un problema con el uso de variables, porque la siguiente
sentencia compila sin problemas:

EXEC SQL SELECT camp_1 INTO :n1 WHERE llave = 'abcd' FOR UPDATE;

Alguien sabe como resolver el problema?

-------------------------------------------------------------------------
Jhon Orellana
Quito - Ecuador

_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.

--------- Pie de mensaje -------------------------------------------
Archivo historico: http://tlali.iztacala.unam.mx/maillist/pgsql-ayuda
Cancelar inscripcion:
mail to: majordomo(at)tlali(dot)iztacala(dot)unam(dot)mx
text : unsubscribe pgsql-ayuda

>From pgsql-ayuda-owner Wed Feb 21 13:42:22 2001
X-Mozilla-Status: 0001
X-Mozilla-Status2: 00000000
Return-Path: <pgsql-ayuda-owner>
Received: (from majordomo(at)localhost)
by tlali.iztacala.unam.mx (8.11.0/8.11.0) id f1LJgMj02904
for pgsql-ayuda-outgoing; Wed, 21 Feb 2001 13:42:22 -0600
X-Authentication-Warning: tlali.iztacala.unam.mx: majordomo set sender to owner-pgsql-ayuda(at)tlali(dot)iztacala(dot)unam(dot)mx using -f
Received: from hotmail.com (f276.law12.hotmail.com [64.4.18.151])
by tlali.iztacala.unam.mx (8.11.0/8.11.0) with ESMTP id f1LJgKC02901
for <pgsql-ayuda(at)tlali(dot)iztacala(dot)unam(dot)mx>; Wed, 21 Feb 2001 13:42:21 -0600
Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC;
Wed, 21 Feb 2001 11:45:26 -0800
Received: from 63.84.236.158 by lw12fd.law12.hotmail.msn.com with HTTP; Wed, 21 Feb 2001 19:45:26 GMT
X-Originating-IP: [63.84.236.158]
From: "Postgres The Best" <postgres99(at)hotmail(dot)com>
To: pgsql-ayuda(at)tlali(dot)iztacala(dot)unam(dot)mx
Subject: [pgsql-ayuda] FOR UPDATE is not allowed in this context
Date: Wed, 21 Feb 2001 14:45:26 -0500
Mime-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1; format=flowed
Message-ID: <F276540VAnsimmT79IS000108ba(at)hotmail(dot)com>
X-OriginalArrivalTime: 21 Feb 2001 19:45:26.0551 (UTC) FILETIME=[D6696270:01C09C3E]
Sender: owner-pgsql-ayuda(at)tlali(dot)iztacala(dot)unam(dot)mx
Precedence: bulk
Reply-To: pgsql-ayuda
Content-Length: 934
Lines: 30

>Saludos:
>
>Cuando precompilo la siguiente sentencia:
>EXEC SQL SELECT camp_1 INTO :n1 WHERE llave = :var_llave FOR UPDATE;
>
>
>El precompilador ECPG presenta el mensaje:
>"FOR UPDATE is not allowed in this context".
>
>PArece haber un problema con el uso de variables, porque la siguiente
>sentencia compila sin problemas:
>
>EXEC SQL SELECT camp_1 INTO :n1 WHERE llave = 'abcd' FOR UPDATE;
>
>Alguien sabe como resolver el problema?
>
>-------------------------------------------------------------------------
>Jhon Orellana
>Quito - Ecuador

_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.

--------- Pie de mensaje -------------------------------------------
Archivo historico: http://tlali.iztacala.unam.mx/maillist/pgsql-ayuda
Cancelar inscripcion:
mail to: majordomo(at)tlali(dot)iztacala(dot)unam(dot)mx
text : unsubscribe pgsql-ayuda

>From pgsql-ayuda-owner Mon Feb 26 11:59:40 2001
X-Mozilla-Status: 0001
X-Mozilla-Status2: 00000000
Return-Path: <pgsql-ayuda-owner>
Received: (from majordomo(at)localhost)
by tlali.iztacala.unam.mx (8.11.0/8.11.0) id f1QHxeP32705
for pgsql-ayuda-outgoing; Mon, 26 Feb 2001 11:59:40 -0600
X-Authentication-Warning: tlali.iztacala.unam.mx: majordomo set sender to owner-pgsql-ayuda(at)tlali(dot)iztacala(dot)unam(dot)mx using -f
Received: from dns.shore.com.mx (IDENT:root(at)dns(dot)shore(dot)com(dot)mx [148.245.7.1])
by tlali.iztacala.unam.mx (8.11.0/8.11.0) with ESMTP id f1QHxcm32702
for <pgsql-ayuda(at)tlali(dot)iztacala(dot)unam(dot)mx>; Mon, 26 Feb 2001 11:59:39 -0600
Received: from ocano ([192.168.0.135])
by dns.shore.com.mx (8.9.3/8.9.3) with SMTP id MAA19007
for <pgsql-ayuda(at)tlali(dot)iztacala(dot)unam(dot)mx>; Mon, 26 Feb 2001 12:02:54 -0600
Message-ID: <002001c0a01f$7efe4fc0$8700a8c0(at)shore(dot)com(dot)mx>
From: "OCR" <ocano(at)lagente(dot)com>
To: <pgsql-ayuda(at)tlali(dot)iztacala(dot)unam(dot)mx>
References: <F276540VAnsimmT79IS000108ba(at)hotmail(dot)com>
Subject: [pgsql-ayuda] Consulta aleatoria
Date: Mon, 26 Feb 2001 11:44:57 -0600
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.00.2615.200
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2615.200
Sender: owner-pgsql-ayuda(at)tlali(dot)iztacala(dot)unam(dot)mx
Precedence: bulk
Reply-To: pgsql-ayuda
Content-Length: 414
Lines: 15

Como puedo hacer una consulta aleatoria
supongo la sig estructura
TABLA1
--------- --------
Campo1 Campo1

Quisiera consulta aleatoriamente 5 registros.
Alguna idea?

--------- Pie de mensaje -------------------------------------------
Archivo historico: http://tlali.iztacala.unam.mx/maillist/pgsql-ayuda
Cancelar inscripcion:
mail to: majordomo(at)tlali(dot)iztacala(dot)unam(dot)mx
text : unsubscribe pgsql-ayuda

>From pgsql-ayuda-owner Mon Feb 26 12:30:04 2001
X-Mozilla-Status: 0011
X-Mozilla-Status2: 00000000
Return-Path: <pgsql-ayuda-owner>
Received: (from majordomo(at)localhost)
by tlali.iztacala.unam.mx (8.11.0/8.11.0) id f1QIU4200505
for pgsql-ayuda-outgoing; Mon, 26 Feb 2001 12:30:04 -0600
X-Authentication-Warning: tlali.iztacala.unam.mx: majordomo set sender to owner-pgsql-ayuda(at)tlali(dot)iztacala(dot)unam(dot)mx using -f
Received: from inter.interservice.com.mx (inter.interservice.com.mx [132.247.1.20])
by tlali.iztacala.unam.mx (8.11.0/8.11.0) with ESMTP id f1QIU3m00502
for <pgsql-ayuda(at)tlali(dot)iztacala(dot)unam(dot)mx>; Mon, 26 Feb 2001 12:30:03 -0600
Received: from localhost (randrade(at)localhost)
by inter.interservice.com.mx (8.8.7/8.8.7) with ESMTP id MAA26535
for <pgsql-ayuda(at)tlali(dot)iztacala(dot)unam(dot)mx>; Mon, 26 Feb 2001 12:35:03 -0600
Date: Mon, 26 Feb 2001 12:35:03 -0600 (CST)
From: "Ing. Roberto Andrade Fonseca" <randrade(at)abl(dot)com(dot)mx>
X-Sender: randrade(at)inter(dot)interservice(dot)com(dot)mx
To: pgsql-ayuda(at)tlali(dot)iztacala(dot)unam(dot)mx
Subject: Re: [pgsql-ayuda] Consulta aleatoria
In-Reply-To: <002001c0a01f$7efe4fc0$8700a8c0(at)shore(dot)com(dot)mx>
Message-ID: <Pine(dot)LNX(dot)4(dot)10(dot)10102261228510(dot)26156-100000(at)inter(dot)interservice(dot)com(dot)mx>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
X-MIME-Autoconverted: from QUOTED-PRINTABLE to 8bit by tlali.iztacala.unam.mx id f1QIU3m00503
Sender: owner-pgsql-ayuda(at)tlali(dot)iztacala(dot)unam(dot)mx
Precedence: bulk
Reply-To: pgsql-ayuda
Content-Length: 1412
Lines: 65

Hola:

On Mon, 26 Feb 2001, OCR wrote:

> Como puedo hacer una consulta aleatoria
> supongo la sig estructura
> TABLA1
> --------- --------
> Campo1 Campo1
>

Así lo hice:

Generé la tabla:
create table numeros(
numero int
);

La llené con los números del 1 al 12:

insert into numeros values (1);
...
insert into numeros values (12);

Y recuperé cinco registros al azar con:

select random()as azar, numero from numeros order by azar limit 5;

lo cual me devuelve:

prueba=# select random()as azar, numero from numeros order by azar limit 5;
azar | numero
---------------------+--------
0.00671962276414019 | 2
0.121354440283661 | 5
0.192979155198196 | 12
0.211814820865083 | 7
0.440431650933079 | 6
(5 rows)

y la siguiente vez
prueba=# select random()as azar, numero from numeros order by azar limit 5;
azar | numero
--------------------+--------
0.0548447822476014 | 6
0.148922119358984 | 1
0.243955252805704 | 11
0.256606923070088 | 2
0.278979752342673 | 3
(5 rows)

Espero que te sirva como base.

Saludos,

Roberto Andrade Fonseca
randrade(at)abl(dot)com(dot)mx

--------- Pie de mensaje -------------------------------------------
Archivo historico: http://tlali.iztacala.unam.mx/maillist/pgsql-ayuda
Cancelar inscripcion:
mail to: majordomo(at)tlali(dot)iztacala(dot)unam(dot)mx
text : unsubscribe pgsql-ayuda

>From pgsql-ayuda-owner Mon Feb 26 13:53:57 2001
X-Mozilla-Status: 0011
X-Mozilla-Status2: 00000000
Return-Path: <pgsql-ayuda-owner>
Received: (from majordomo(at)localhost)
by tlali.iztacala.unam.mx (8.11.0/8.11.0) id f1QJrv300969
for pgsql-ayuda-outgoing; Mon, 26 Feb 2001 13:53:57 -0600
X-Authentication-Warning: tlali.iztacala.unam.mx: majordomo set sender to owner-pgsql-ayuda(at)tlali(dot)iztacala(dot)unam(dot)mx using -f
Received: from dns.shore.com.mx (IDENT:root(at)dns(dot)shore(dot)com(dot)mx [148.245.7.1])
by tlali.iztacala.unam.mx (8.11.0/8.11.0) with ESMTP id f1QJrum00966
for <pgsql-ayuda(at)tlali(dot)iztacala(dot)unam(dot)mx>; Mon, 26 Feb 2001 13:53:56 -0600
Received: from ocano ([192.168.0.135])
by dns.shore.com.mx (8.9.3/8.9.3) with SMTP id NAA19722
for <pgsql-ayuda(at)tlali(dot)iztacala(dot)unam(dot)mx>; Mon, 26 Feb 2001 13:57:11 -0600
Message-ID: <003e01c0a02f$75e4a640$8700a8c0(at)shore(dot)com(dot)mx>
From: "OCR" <ocano(at)lagente(dot)com>
To: <pgsql-ayuda(at)tlali(dot)iztacala(dot)unam(dot)mx>
References: <Pine(dot)LNX(dot)4(dot)10(dot)10102261228510(dot)26156-100000(at)inter(dot)interservice(dot)com(dot)mx>
Subject: Re: [pgsql-ayuda] Consulta aleatoria
Date: Mon, 26 Feb 2001 14:05:26 -0600
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.00.2615.200
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2615.200
Sender: owner-pgsql-ayuda(at)tlali(dot)iztacala(dot)unam(dot)mx
Precedence: bulk
Reply-To: pgsql-ayuda
Content-Length: 311
Lines: 10

> Espero que te sirva como base.
CLARO QUE SI.
COMO SIEMPRE MIL GRACIAS.

--------- Pie de mensaje -------------------------------------------
Archivo historico: http://tlali.iztacala.unam.mx/maillist/pgsql-ayuda
Cancelar inscripcion:
mail to: majordomo(at)tlali(dot)iztacala(dot)unam(dot)mx
text : unsubscribe pgsql-ayuda

>From pgsql-ayuda-owner Tue Feb 27 07:21:16 2001
X-Mozilla-Status: 0001
X-Mozilla-Status2: 00000000
Return-Path: <pgsql-ayuda-owner>
Received: (from majordomo(at)localhost)
by tlali.iztacala.unam.mx (8.11.0/8.11.0) id f1RDLGE05795
for pgsql-ayuda-outgoing; Tue, 27 Feb 2001 07:21:16 -0600
X-Authentication-Warning: tlali.iztacala.unam.mx: majordomo set sender to owner-pgsql-ayuda(at)tlali(dot)iztacala(dot)unam(dot)mx using -f
Received: from igate.intranet.coopinde.com.ar (host025243.arnet.net.ar [200.45.25.243])
by tlali.iztacala.unam.mx (8.11.0/8.11.0) with ESMTP id f1RDLCP05792
for <pgsql-ayuda(at)tlali(dot)iztacala(dot)unam(dot)mx>; Tue, 27 Feb 2001 07:21:12 -0600
Received: from desa19 (PC101.intranet.coopinde.com.ar [10.1.1.101])
by igate.intranet.coopinde.com.ar (8.9.3/8.9.3) with SMTP id KAA00944
for <pgsql-ayuda(at)tlali(dot)iztacala(dot)unam(dot)mx>; Tue, 27 Feb 2001 10:23:44 -0300
X-Authentication-Warning: igate.intranet.coopinde.com.ar: Host PC101.intranet.coopinde.com.ar [10.1.1.101] claimed to be desa19
Message-ID: <001e01c0a0c0$c8141c20$6501010a(at)intranet(dot)coopinde(dot)com(dot)ar>
From: "Mario Oroz" <jmoroz(at)uol(dot)com(dot)ar>
To: <pgsql-ayuda(at)tlali(dot)iztacala(dot)unam(dot)mx>
Subject: [pgsql-ayuda] Problemas con la sentencia COPY FROM
Date: Tue, 27 Feb 2001 10:25:41 -0300
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 8bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.00.2615.200
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2615.200
Sender: owner-pgsql-ayuda(at)tlali(dot)iztacala(dot)unam(dot)mx
Precedence: bulk
Reply-To: pgsql-ayuda
Content-Length: 3653
Lines: 101

Hola a todos, como estan:

El problema es este:

Se me clava el Comando COPY del SQL de Postgres.
Esta es la oprden que escribo en el psql:

car=# COPY servicios FROM '/usr/local/pgsql/car/servicio.d.in' USING DELIMITERS
'|';

Me tira una linea sin texto y se queda muerto.
Luego oprimo Ctrl-C con lo que consigo un simple: Cancel request send

Luego para salir de la congelada interface psql emito una orden para matar el
proceso que esta estancado.
# ps ax
...
380 ? S 0:00 /usr/local/pgsql/bin/postmaster -i -D/usr/local/pgsql/data
381 ? SW 0:00 (logger)
399 2 S 0:00 -bash
427 2 S 0:00 psql car mario
428 ? R 3:04 /usr/local/pgsql/bin/postgres localhost mario car COPY
En este caso debo matar el proceso 428: # kill -9 428 y en el psql obtengo esto:
(a continuacion de lo antes mensionado)

pqReadData() -- backend closed the channel unexpectedly.
This probably means the backend terminated abnormally
before or while processing the request.
The connection to the server was lost. Attempting reset: Failed.
!#

y me queda con ese prompt " !# " que con Ctrl-C no vuelve al comun "car=#" ,que
seria lo de menos a no ser que me esta indicando algo...?

Bueno, lo confirme: el prompt "!#" me indica que no estoy conectado a la
base. Haciendo una simple consulta me da esto:

!# SELECT * FROM propietarios;
You are currently not connected to a database.

y asi con susecivos comandos del psql propios como: \d propietarios

A todo esto el syslog me esta dando lo siguiente:

...
Feb 26 15:26:14 aries PAM_pwdb[400]: (login) session closed for user root
Feb 26 15:26:35 aries logger: Server process (pid 428) exited with status 9 at
Mon Feb 26 15:26:35 2001
Feb 26 15:26:35 aries logger: Terminating any active server processes...
Feb 26 15:26:35 aries logger: Server processes were terminated at Mon Feb 26
15:26:35 2001
Feb 26 15:26:35 aries logger: Reinitializing shared memory and semaphores
Feb 26 15:26:35 aries logger: DEBUG: Data Base System is starting up at Mon
Feb 26 15:26:35 2001
Feb 26 15:26:35 aries logger: The Data Base System is starting up
Feb 26 15:26:35 aries logger: DEBUG: Data Base System was interrupted being in
production at Mon Feb 26 15:01:12 2001
Feb 26 15:26:35 aries logger: DEBUG: Data Base System is in production state
at Mon Feb 26 15:26:35 2001
Feb 26 15:41:07 aries -- MARK --

Bueno espero que alguien me heche un poco de luz para ver donde
esta el problem!!

*************************
Comentario:

Con otras tablas he experimentado borrando su contenido y cargandolo de nuevo
con el comando COPY y !!!! No hubo Problemas !!!!, mientas experimentaba los
problemas expuestos para la tabla mencionada arriba.
Gracias Totales.
*************************

!!!!!Ultimo momento!!!!!
**************************
Hice un car=# DROP TABLE TABLAXX;
con lo que elimine la tabla y volvi a crearla, luego intente cargarla
con COPY y paso de lo mas bien.

Pero Esto fue luego de otros intentos fallidos, paraece ser que halgo hace
fallar el comando COPY, y ademas deja la tabla dañada.

El Proceso que les comente arriva lo tuve que hacer dos veces, puesto que en la
1º vez me dio el error arriba mensionado, borre y cree de nuevo la tabla y carge
con COPY nuevamente y esta ves si paso.
***************************

Espero Alguna Sugerencia.
Seria conveniente hacer el test de regresion, o como se llame, en que condi-
ciones debo ejecurtarlo.

Gracias.

--------- Pie de mensaje -------------------------------------------
Archivo historico: http://tlali.iztacala.unam.mx/maillist/pgsql-ayuda
Cancelar inscripcion:
mail to: majordomo(at)tlali(dot)iztacala(dot)unam(dot)mx
text : unsubscribe pgsql-ayuda

>From pgsql-ayuda-owner Wed Feb 28 21:43:51 2001
X-Mozilla-Status: 0001
X-Mozilla-Status2: 00000000
Return-Path: <pgsql-ayuda-owner>
Received: (from majordomo(at)localhost)
by tlali.iztacala.unam.mx (8.11.0/8.11.0) id f213hpW17423
for pgsql-ayuda-outgoing; Wed, 28 Feb 2001 21:43:51 -0600
X-Authentication-Warning: tlali.iztacala.unam.mx: majordomo set sender to owner-pgsql-ayuda(at)tlali(dot)iztacala(dot)unam(dot)mx using -f
Received: from servidor.unam.mx (servidor.unam.mx [132.248.10.1])
by tlali.iztacala.unam.mx (8.11.0/8.11.0) with ESMTP id f213hok17420
for <pgsql-ayuda(at)tlali(dot)iztacala(dot)unam(dot)mx>; Wed, 28 Feb 2001 21:43:50 -0600
Received: from servidor.unam.mx (proteo.dgsca.unam.mx [132.248.170.131])
by servidor.unam.mx (8.11.1/8.11.1) with ESMTP id f213kSC09864
for <pgsql-ayuda(at)tlali(dot)iztacala(dot)unam(dot)mx>; Wed, 28 Feb 2001 21:46:28 -0600 (CST)
Message-ID: <3A9DC735(dot)2521C46D(at)servidor(dot)unam(dot)mx>
Date: Wed, 28 Feb 2001 21:51:17 -0600
From: Bolo Lacertus <lacertus(at)servidor(dot)unam(dot)mx>
Organization: Coordinacion de Prospeccion =?iso-8859-1?Q?Tecnol=F3gica?= UNAM
X-Mailer: Mozilla 4.7 [en] (X11; I; IRIX 6.3 IP32)
X-Accept-Language: en
MIME-Version: 1.0
To: pgsql-ayuda(at)tlali(dot)iztacala(dot)unam(dot)mx
Subject: [pgsql-ayuda] Problemas con subquierys en FROM
References: <Pine(dot)LNX(dot)4(dot)10(dot)10102261228510(dot)26156-100000(at)inter(dot)interservice(dot)com(dot)mx> <001f01c0a0ee$c0900b20$8700a8c0(at)shore(dot)com(dot)mx>
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
X-MIME-Autoconverted: from quoted-printable to 8bit by tlali.iztacala.unam.mx id f213hok17421
Sender: owner-pgsql-ayuda(at)tlali(dot)iztacala(dot)unam(dot)mx
Precedence: bulk
Reply-To: pgsql-ayuda
Content-Length: 1119
Lines: 33

Saludos!

Tengo un problema con Postgres que con algo de suerte hallará respuesta
en el foro.

Estoy usando el Postgres 7 y necesito hacer un subquery en el FROM, de
modo que el resultado de un select lo pueda usar como una tabla la que
uso en otro select.

Si entindo bien la referencia un comando como este debería funcionar:

selec tab.* from (select * from tabla) as tab;

Pero me marca:
ERROR: parser: parse error at or near "select"

?Alguien sabe como se usan este tipo de sub-selects?

Agraedciendoles su ayuda: Daniel Sol

P.D. El propósito de usar el sub-select en el FROM es seleccionar los 10
registros mas nuevos de un criterio y entonces ordenarlos por otro
campo, por ejemplo, tomamos los 10 artículos mas nuevos y luego los
ordenamos por marca.
--
Bolo Lacertus: lacertus(at)servidor(dot)dgsca(dot)unam(dot)mx ==~\___\
http://proteo.dgsca.unam.mx/cgi-bin/lacertus/hola =__vvvv
--------- Pie de mensaje -------------------------------------------
Archivo historico: http://tlali.iztacala.unam.mx/maillist/pgsql-ayuda
Cancelar inscripcion:
mail to: majordomo(at)tlali(dot)iztacala(dot)unam(dot)mx
text : unsubscribe pgsql-ayuda

Browse pgsql-es-ayuda by date

  From Date Subject
Next Message JARRIN FLORES JORGE ALEXIS 2001-03-01 12:50:57 RE: [pgsql-ayuda] Problemas con subquierys en FROM
Previous Message CyberMaya 2001-01-02 01:33:25 [pgsql-ayuda] Ayuda con error: Is the postmaster running at 'localhost' and accepting connections on Unix socke