Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi one table has three fields
Rec_No | Teams | Flag |
1 | AB | 0 |
1 | AC | 0 |
1 | AV | 0 |
1 | AM | 0 |
1 | AJ | 1 |
2 | WE | 0 |
2 | WQ | 0 |
2 | WR | 1 |
3 | RT | 0 |
3 | RY | 0 |
3 | RU | 0 |
3 | RG | 0 |
3 | RH | 0 |
3 | RJ | 0 |
I want to combine Teams as per records, whose falg=0
I want output like below
Teams |
AB;AC;AV;AM |
WE;WQ |
RT;RY;RU;RG;RH;RJ |
Load Concat(Teams,';') as Teams
From YourTable
Where Flag = 0
Group By Rec_No;
you can also do it dynamically in your table
concat(distinct {<Flag={0}>}Teams,',')
Load Concat(Teams,';') as Teams
From YourTable
Where Flag = 0
Group By Rec_No;
you can also do it dynamically in your table
concat(distinct {<Flag={0}>}Teams,',')
Thankyou
Thank you
yw