This is an example:
@strProjectnvarchar(255) = NULL
set nocount on
-- Declarations
...
-- Create Temporary Tables
create table #tblProject
(proj_projectid nvarchar(9) not null primary key)
if ((@strProject IS NULL) OR (@strProject = ''))
insert into #tblProject(proj_projectid)
select prj_code
from Project
else
begin
select...