sql server 2008 - how to use distinct with where clause and inner join -
i have following query want use clause show not distinct values please me when use multiple columns after currentdate doesn't shows distinct values
select convert(varchar(10), ts.current_datetime, 101) currentdatets,ts.student_id,tc.class_name,tsi.section_name,tl.test_name tblstudentmarks ts inner join tblclassinfo tc on tc.idx = ts.class_id inner join tblsectioninfo tsi on tsi.idx = ts.section_id inner join tblsubjects su on su.idx = ts.subject_id inner join tbltestlist tl on tl.idx = ts.testtype ts.school_id = 2 , ts.section_id = 1 , ts.class_id = 2 , ts.testtype = 1
your question unclear, seems need add distinct
select...
select distinct convert(varchar(10), ts.current_datetime, 101) currentdate tblstudentmarks ts inner join tblclassinfo tc on tc.idx = ts.class_id inner join tblsectioninfo tsi on tsi.idx = ts.section_id inner join tblsubjects su on su.idx = ts.subject_id inner join tbltestlist tl on tl.idx = ts.testtype ts.school_id = 2 , ts.section_id = 1 , ts.class_id = 2 , ts.testtype = 1
Comments
Post a Comment