Good Morning All,
I have a dataset based on a job start date between 7/1 AND 8/31 for years 2006 to 2008. Jobs can be entered at any time, meaning a job could be intered in 2009 that occurred in 2007. The qualifier for my dataset is createddate < 10/1. My sql statement is below. How do I generically query the 10/1 for any given year? I'm thinking DatePart, but I'm not sure. Thank you in advance.
SELECT JobStudentID
, JobStartdate
, JobEndDate
FROM Jobs
WHERE JobSession = 'summer'
AND Year(JobstartDate) >= 2006
AND CreatedDate < '10/1'
I have a dataset based on a job start date between 7/1 AND 8/31 for years 2006 to 2008. Jobs can be entered at any time, meaning a job could be intered in 2009 that occurred in 2007. The qualifier for my dataset is createddate < 10/1. My sql statement is below. How do I generically query the 10/1 for any given year? I'm thinking DatePart, but I'm not sure. Thank you in advance.
SELECT JobStudentID
, JobStartdate
, JobEndDate
FROM Jobs
WHERE JobSession = 'summer'
AND Year(JobstartDate) >= 2006
AND CreatedDate < '10/1'