Quantcast
Channel: Teradata Forums - All forums
Viewing all articles
Browse latest Browse all 27759

Can someone guide me in generating the Seq number? - forum topic by kathir_chaser

$
0
0

i/p data
Sys Num, ID, Descr,
0001, 10, Provider
0001, 10, Pro
0002, 84, Service
0003, 24, Buisness
0003, 24, Admin
0003, 24, Finance
0004, 41, Philosophy

My desired o/p is

Sys Num, ID, Descr, Sum
0001, 10, Provider -1
0001, 10, Pro -1
0002, 84, Service -2
0003, 24, Buisness -3
0003, 24, Admin -3
0003, 24, Finance -3
0004, 41, Philosophy -4
tried using Sum(-1) over(order by sys_num rows unbound preceding)and partition in the sum column but failed.

Thanks
Kathir

Forums: 

Viewing all articles
Browse latest Browse all 27759

Trending Articles



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