select a.ID,a.Code,b.* from Base_Profile a left join Base_Profile_Trl b on a.ID=b.ID  where a.Code like 'OAtemplate%'