no problem, but with your solution i don't understand why you use an if..else statement here
if @JobRole <> '%'
begin
Select NoOfVacancies,JobRole from JobVacancy where JobRole LIKE @JobRole+ '%'
end
else
begin
Select NoOfVacancies,JobRole from JobVacancy where (JobRole LIKE @JobRole+ '%' OR JobRole is null)
end
im sure you'd get the same result by just saying
select NoOfVacancies, JobRole
from JobVacancy
where JobRole like @JobRole + '%'
or JobRole is null
if @JobRole is '%' your statement would say '..where JobRole like '%%' which is the same as saying where JobRole like '%'; both solutions would work but I think you may be overcomplicating slightly.
on the right track though :)