• Hi,

    What is being returned to @weeknumber before you try the SET @WeekNum = 'SELECT * FROM w' + @weeknumend?

    Regards

    Stephen