Iam using case statement but unable to achieve the results ( as below)
case when rownum=1 then DATE else ‘null’ end as Col1,
case when rownum=1 then DATE else ‘null’ end as Col2,
ID COl1 Col2
1 1/1/2000 NULL
1 NULL 1/2/2000
when rownum=1 then col1 should populate rownum2 col2 should populate so on…up to 10
I have date as shown below
Data :
ID DATE ROWNUM
1 1/1/2000 1
1 1/2/2000 2
2 12/30/2000 1
2 12/31/2000 2
Expected result:
ID COl1 Col2
1 1/1/2000 1/2/2000
2 12/30/2000 12/31/2000