kapil_kk (2/20/2013)
you can do this using CASE also..
I try this
select iSchoolYearCode,
CASE WHEN iCalendarDatCategoryID = 15 THEN dtCalendarDay
ELSE '' End,
CASE WHEN iCalendarDatCategoryID = 89 THEN dtCalendarDay
ELSE '' End
from #Temp1
but didn't work