Thnaks guys for your replies. I created a view but it still does not help. May be after i post this table structure, will help ypu guys to decode further.
here is the crude table knowledge_domains
CODE NAME
CIVIL Civil
CivNuclNuclear - Civil
DEFENCEDefence
ENERGYEnergy
FUNCTIONPAR
GENERICGeneric
MARINEMarine
NUCLEARNuclear - Submarines
R&T R&T
The output which is expect is this. this output will be for SSRS report
CODE NAME
(Civil,Nuclear - Civil,Defence,Energy,PAR,Generic,Marine,Nuclear - Submarines,R&T,)All
CIVIL Civil
DEFENCE Defence
ENERGY Energy
GENERIC Generic
MARINE Marine
CivNucl Nuclear - Civil
NUCLEAR Nuclear - Submarines
FUNCTION PAR
R&T R&T