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

Sql server query for concatinating same column values if they are repeated

$
0
0

Hi

I have a query as below

SELECT A.ClaimID, A.Member, B.Provider, B.ProcCD,  B.ChargesAmt, C.PaidDate, D.CheckNo, E.PayeeName, E.PayeeID

FROM A

JOIN B

JOIN C

JOIN D

JOIN E

If I execute this query I will get results like below.

What I need is I have to get the Proc Cd in one columns for all same cliamID’s and they should be different and seperated by comas and in this I have to get 5 proc codes first seperated by comas and then a + sign after the fifth one and next five and so on………

And I need check num, payee name, payee ID  as same as above proc code but no need that 5 codes logic just it have to give all in one column that are refered to same claim.

Please help me on this ASAP

Thanks  & Regards

Hemanth


hemanth


Viewing all articles
Browse latest Browse all 23857

Trending Articles



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