I want to be able to pass in a day number like 1, 2, 3 or 7 and it will return the day name like Sunday, Monday, Tuesday or Saturday. I know there is the option of using a <
Try this :
declare @m varchar set @m=1 SELECT DATENAME(DW,CAST(@m AS INT))