Quantcast
Channel: Teradata Forums - Database
Viewing all articles
Browse latest Browse all 14773

Move column data as rows - response (3) by Raja_KT

$
0
0

Hi,

 

 

  create table then select 

The query:

 

SELECT NAME as ID FROM tabl1---note here I want to  get the col as you want

UNION ALL

SELECT DISTINCT TO_CHAR(ID) FROM tabl1

UNION ALL

SELECT VALUE FROM tabl1

 

Result:

 

ID

A

B

C

D

E

123

1

2

3

4

 

 

Cheers,

Raja


Viewing all articles
Browse latest Browse all 14773

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>