Hi again,
the actual statement I am using, in a test, is:
set @SQL ='select PName, PDate
from tblPBase
where PDate between 2005/01/01 and ' +
convert(varchar,coalesce(@parameter1)) + '
Order By PDate desc'
I type the param: '2005/06/06' as, not to have problems in confusing mm with dd...