Hello,
I need one logical help to develop one logic,
below is dll
CREATE TABLE #X1
(
ID VARCHAR(10),
CODE VARCHAR(10),
PrimaryInd INT
)
INSERT INTO #X1 VALUES ('12345','01',0)
INSERT INTO #X1 VALUES ('12345','03',0)
INSERT INTO #X1 VALUES ('12345','04',1)
I need to concate the string and order by PrimaryInd.
desired output
IDCode
1234504,01,03
Can anyone please help me develop this logic.