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

T-SQL Query help

$
0
0

I Have table like

CustName GroupName Joining Date
AAAA G1 1-Jan-00
BBBB G2 1-Feb-06
CCCC G3 1-Mar-08
DDDD G1 1-Mar-10
EEEEE G2 1-Mar-11

I have to develop report displaying customer relationship length in years(current date - joining date) as follows

0-55-1010-15
G1101
G2110
G3010

can we acheive it single sql query?


Viewing all articles
Browse latest Browse all 23857

Trending Articles



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