hi..
here i hook sample data for your reference,
CREATE TABLE `test` (
`RIGHT_CODE` int(11) DEFAULT NULL,
`GRP_CODE` int(11) DEFAULT NULL,
`ROOT_DESC` varchar(50) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
INSERT INTO `test` (`RIGHT_CODE`, `GRP_CODE`, `ROOT_DESC`) VALUES
(1, 1, '000001#'),
(2, 1, '000001#000001#'),
(3, 1, '000001#000002#'),
(4, 1, '000001#000003#'),
(5, 1, '000001#000004#'),
(6, 1, '000002#'),
(7, 1, '000002#000001#'),
(27, 1, '000005#000001#'),
(28, 1, '000001#'),
(28, 2, '000001#000001#');
I sure u know the result of this query ,
SELECT group_concat(RIGHT_CODE)
FROM table_name
GROUP BY `GRP_CODE` , `ROOT_DESC`
HAVING count( `RIGHT_CODE` ) >=2;
from the above query i got 1,28..
if i pass this query inside IN clause mean i got only empty result ..
And i dont know why group concated value not working in IN clause???