Question Join/Subselect - Mailing list pgsql-general

From Alex
Subject Question Join/Subselect
Date
Msg-id 3F4D76EF.30705@meerkatsoft.com
Whole thread Raw
Responses Re: Question Join/Subselect
List pgsql-general
Hi,

I have some problems with creating a query that will replace values in
one table from another one.

Table 1:
userName : refCode1 : refCode2
------------------------------
alex     :  12      : 24

Table 2:
refCode :  ActualCode
---------------------
12          AAAAAA
24          BBBBBB


Result Desired
userName : refCode1 : refCode2
------------------------------
alex     :  AAAAAA  : BBBBBB


I need to crete a view that returns me Table1 but replaces refCode1,
refCode2 with the ActualCode.

I did not have any success with Joins or Subselects so far.

Thanks for any advise

Alex



pgsql-general by date:

Previous
From: Bruno Wolff III
Date:
Subject: Re: The ..... worm
Next
From: expect
Date:
Subject: Re: The ..... worm