Re:

From: Alvaro Herrera <alvherre(at)surnet(dot)cl>
To: Victor <victor(dot)perez(at)e-evolution(dot)com>
Cc: Manuel Sugawara <masm(at)fciencias(dot)unam(dot)mx>, pgsql-es-ayuda(at)postgresql(dot)org
Subject: Re:
Date: 2005-06-29 02:44:34
Message-ID: 20050629024434.GB7196@surnet.cl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-es-ayuda

On Tue, Jun 28, 2005 at 06:17:04PM -0500, Victor wrote:

> UPDATE I_BPartner i SET C_BPartner_Location_ID=(SELECT C_BPartner_Location_ID
> FROM C_BPartner_Location bpl INNER JOIN C_Location l ON
> (bpl.C_Location_ID=l.C_Location_ID)
> WHERE i.C_BPartner_ID=bpl.C_BPartner_ID AND bpl.AD_Client_ID=i.AD_Client_ID
> AND DUMP(i.Address1)=DUMP(l.Address1) AND DUMP(i.Address2)=DUMP(l.Address2)
> AND DUMP(i.City)=DUMP(l.City) AND DUMP(i.Postal)=DUMP(l.Postal) AND
> DUMP(i.Postal_Add)=DUMP(l.Postal_Add) AND
> DUMP(i.C_Region_ID)=DUMP(l.C_Region_ID) AND
> DUMP(i.C_Country_ID)=DUMP(l.C_Country_ID))
> WHERE C_BPartner_ID IS NOT NULL AND C_BPartner_Location_ID IS NULL AND
> I_IsImported='N'
>
> lo que entiendo que hace es comparar dos valores de distintas tablas
> convirtiendolos en hexadecimal de esa manera identifica que sean exactos.

No es dificil hacer una funcion en C que haga esto, AFAICS. Es solo una
lata tener que definirla para cada tipo de dato que existe.

--
Alvaro Herrera (<alvherre[a]surnet.cl>)
Voy a acabar con todos los humanos / con los humanos yo acabaré
voy a acabar con todos / con todos los humanos acabaré (Bender)

In response to

  • Re: at 2005-06-28 23:17:04 from Victor

Browse pgsql-es-ayuda by date

  From Date Subject
Next Message Jaime Casanova 2005-06-29 07:37:57 Re: Ayuda
Previous Message Fernando San Martín Woerner 2005-06-28 23:51:57 Re: