sql server 2008 - SQL query with distinct records -


i want distinct records below query. mean if uncomment commented lines.

please help.

select cs1.nm categorytype, cs2.nm category --, cs2.nm sub_category cat_struct cs inner join cntrct_cat cc     on cc.cat_struct_id = cs.cat_struct_id  inner join cat_struct cs1     on cs1.cat_cd = cs.cat_cd , cs1.mkt_cd not null inner join cat_struct cs2     on cs2.cat_cd = cs.cat_cd , cs2.mkt_cd null  --join cat_struct cs3      --on cs3.cat_cd = cs.cat_cd , cs3.mkt_cd null  --and cs3.sub_cat_cd not null      cs.lob_cd ='p'  , cc.cntrct_vers_id = 781439637 , cs2.nm = 'adult books' 

use keyword distinct in select statement.

yow records not repeated.

thanks


Comments

Popular posts from this blog

user interface - how to replace an ongoing process of image capture from another process call over the same ImageLabel in python's GUI TKinter -

javascript - Restarting Supervisor and effect on FlaskSocketIO -

php - Mongodb connectivity error -