Home » SQL & PL/SQL » SQL & PL/SQL » replace colum value
replace colum value [message #192980] Thu, 14 September 2006 08:02 Go to next message
Messages: 27
Registered: March 2005
Location: Dhaka
Junior Member

hello all

i 've 2 tables, Table A with 4 columns & table B with 2 columns.

Table A

col1 col2 col3 col4
1 2 3 4

Table B

col1 col2
1 A
2 B
3 C
4 D

i want an output like below where the row values in table A is replaced by col2 values in Table B.

sample output
col1 col2 col3 col4



Re: replace colum value [message #193022 is a reply to message #192980] Thu, 14 September 2006 10:10 Go to previous message
Messages: 325
Registered: April 2004
Senior Member
select b1.col2, c2.col2, b3.col2, b4.col2
from table_a a, table_b b1, table_b b2, table_b b3, table_b b4
where a.col1 = b1.col1
and a.col2 = b2.col1
and a.col3 = b3.col1
and a.col4 = b4.col1
Previous Topic: Warning Message
Next Topic: Help with subquery
Goto Forum:

Current Time: Wed Aug 16 16:52:39 CDT 2017

Total time taken to generate the page: 0.08724 seconds