Basssque
asked on
SSIS/SSDT Derived Table - calculating dates within the last year
I'm trying to calculate dates within the last year and output a string if true
I've attempted the following syntax but it doesn't work
JOBS_CONTRACT_END_DATE < (DT_WSTR,10)(DT_DBDATE)(GE TDATE()) && JOBS_CONTRACT_END_DATE > (DT_WSTR,10)(DT_DBDATE)(GE TDATE()-36 5) ? "ALERT(Certificate Has Expired within the past year and employment status is yes)" : CERTIFICATES_TO_DATE
I was able to use the following syntax to output a string if the date is only less than the current date.
I need to add something to only output the string for dates within the last year though.
JOBS_CONTRACT_END_DATE < (DT_WSTR,10)(DT_DBDATE)(GE TDATE()) ? "ALERT(Certificate Has Expired)" : CERTIFICATES_TO_DATE
Thanks!!
I've attempted the following syntax but it doesn't work
JOBS_CONTRACT_END_DATE < (DT_WSTR,10)(DT_DBDATE)(GE
I was able to use the following syntax to output a string if the date is only less than the current date.
I need to add something to only output the string for dates within the last year though.
JOBS_CONTRACT_END_DATE < (DT_WSTR,10)(DT_DBDATE)(GE
Thanks!!
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I had to change my logic to accomplish the goal, but your answer was perfect!
Below is the functional end result
JOBS_CONTRACT_END_DATE > (DT_WSTR,10)(DT_DBDATE)(GE