Home » SQL & PL/SQL » SQL & PL/SQL » Rows into Columns (2 merged) (Oracle 10G, Windows 2012R2)
Rows into Columns (2 merged) [message #677704] Tue, 08 October 2019 05:58 Go to previous message
hissam78
Messages: 111
Registered: August 2011
Location: PAKISTAN
Senior Member
Dear All,
We have two tables

In Table B_TABLE we have two Columns ATTRIB_A and ATTRIB_B, in these columns we have a following values

ATTRIB_A ATTRIB_B

LENGTH_A 10
WIDTH_A 50

In Table A_TABLE we have the columns same like the values of B_table Column e.g. LENGTH_A, WIDTH_A, now we want to populate the
values of ATTRIB_B in the Columns of A_TABLE.

So in LENGTH_A and WIDTH_A value should populate 10, 50 from B_Table to A_Table Column because rows in B_Table same like the Columns in A_Table

is it possible to populate??

following is the table script..


CREATE TABLE A_TABLE
(
LENGTH_A NUMBER,
HEIGHT_A NUMBER,
FORMULA VARCHAR2(50 BYTE),
RESULT NUMBER,
WIDTH_A NUMBER,
AREA_A NUMBER
)

=============================================

CREATE TABLE B_TABLE
(
ATTRIB_A VARCHAR2(100),
ATTRIB_B NUMBER
)


LENGTH_A 10
WIDTH_A 50


Thankful
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: delete from table where one of the column is nested table is running long.
Next Topic: How to Pass number value to a varchar field
Goto Forum:
  


Current Time: Wed Jan 22 08:10:27 CST 2020