Sreekanth Reddy

Sreekanth Reddy

  • 326
  • 4.8k
  • 404.7k

User Defined Function in sql server.

Oct 11 2014 1:29 AM
Hai Friends,
I am having a table as follows:
ID Row1 Row2
1 a 20
2 b 12
3 c 16
4 a 11
5 a 10
6 c 18
7 b 15
When we pass "a" from "Row1" in a query, we should get the output as follows:
ID          Row1        Row2
1,4,5          a          20,11,10
I should get it by using functions(UDF's).
I have tried a lot friends, but unable to get the solution.
Please any one provide me solution for this.
Thank you.

Answers (3)