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



---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org

Reply via email to