Hey All
I am new to SQL development and come from a help desk background. This is one of my first projects and I am stuck. My out come would be to use the- SELECT DATEPART(WEEKDAY, GETDATE())- into a current table I have set up. The following code attached is what I am working with. My outcome would be to create another column next to my results with numeric values next to the dates. I am stuck by only getting the current date but I would like it to go for my whole selected date range. Any help is appreciated. This screen shot was from yesterday so I understand today would be 4 and so on.
Steve
SELECT * FROM ##salesdays
EXCEPT
SELECT date FROM dbo.csta_non_working_days
SELECT DATEPART(WEEKDAY, GETDATE())
This gives me the following results below in the image.