Hi All,
I need help in the below query:
Declare @table table ( consumerID varchar(10), customerNumber varchar(10) ) Insert into @table Select 1,123 union all Select 2,123 union all Select 3,123 Union all Select 4,123 Union all Select 5,323 Union all Select 6,323 Union all Select 7,323 select *from @table --Expected output concatenation of consumer numbers all permitation and combinations having same customernumber 1 2 1 3 1 4 2 3 2 4 3 4 5 6 5 7 6 7
Regards,
Ram.