Quantcast
Channel: Transact-SQL forum
Viewing all articles
Browse latest Browse all 23857

how to get difference of two rows as third row

$
0
0

hi..

i want to calculate variance of row..for example salary of employee

emp_code month      basic       hra        splall        da         lta
a001 jan100005000500080007000
a001 feb100004000500070009000
a001 diff0-10000-10002000


first two row are in table, i have to get third row for all emp. as above format...fields may increase/ decrease..

please help...



Viewing all articles
Browse latest Browse all 23857

Trending Articles



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