select camp.campaignCode,CampaignName, beginDate, endDate, leadingCampCode, isnull(sm.mediaCode,0) \'Social Media\', isNull(stm.mediaCode,0) as \'Personal\' from [db