Help with a query

From: "jose antonio leo" <jaleo8(at)storelandia(dot)com>
To: "pgsql-general" <pgsql-general(at)postgresql(dot)org>
Subject: Help with a query
Date: 2003-04-25 07:41:27
Message-ID: KAEFLIDKHEJNPPKOLGHMCELMDCAA.jaleo8@storelandia.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


Hi guys!

I need make a join query.
I have two tables with the next fields:

aec_cua_man:
ac1-ac2-ac3
1-1-1
1-1-2
1-1-4
1-2-2
....

aecoc:
ac1-ac2-ac3-description
1-0-0-des1
1-1-0-des2
1-1-1-des3
1-1-2-des4
1-1-3-des5
1-1-4-des6
1-1-5-des7
1-2-0-des8
1-2-1-des9
1-2-2-des10
....

I need the record of the first table with the fields ac1, ac2 and ac3 equals
than second table but in addition the fiels of the second table with a nul
in the fiels ac2 and ac3.

the table result will be:
1-0-0-des1
1-1-0-des2
1-1-1-des3
1-1-2-des4
1-1-4-des6
1-2-0-des8
1-2-2-des10

Could you help me?

Jose Antonio

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Együd Csaba 2003-04-25 08:21:20 Re: Returning with a userd defined type (PL/pgSQL)
Previous Message mixo 2003-04-25 07:16:48 transactions -- avoid hanging due to locks