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

javascript - Using jquery append to add option values into a select element not working -

Android soft keyboard reverts to default keyboard on orientation change -

jquery - javascript onscroll fade same class but with different div -