--I have modified ur Query,try this,
DECLARE @yeara [varchar](4)
DECLARE @month1 [varchar](2)
DECLARE @day1 [varchar](2)
DECLARE @mydate1 [datetime]
DECLARE @HOFSH [varchar](2)
DECLARE @nan [varchar](10)
DECLARE @mhkx VARCHAR(10)
DECLARE @mhkxa VARCHAR(50)
DECLARE @sqlCmd VARCHAR(1000)
SET @mhkx = '1,2'
SET @yeara='2003'
SET...