Skip to Main Content

SQL & PL/SQL

Announcement

Testing banner

Need to form the rows into columns using below data source

User_IT7WJDec 7 2022

@frank-kulash

create table test_lgc(id number, name varchar2(20))
insert all
into test_lgc values (1,'a')
into test_lgc values (1,'b')
into test_lgc values (1,'c')
into test_lgc values (1,'x')
into test_lgc values (1,'y')
into test_lgc values (1,'z')
select * from dual;

select * from test_lgc
image.pngimage.png Now I was able to get the data using above query,, Lead says to remove the hard coding which is highlighted as an blue arrow , those numbers 1 , 2, 3 should be removed, use some logic so that hard coding of sequential numbers can be removed
I am using "Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.14.0.0.0"
@frank-kulashIs there any way to remove the hard coding.

Comments
Post Details
Added on Dec 7 2022
2 comments
45 views