Does anybody know the code to determine what the date is of the 3rd Friday of every month is?
Never write code when you can build a table, that's what *I* always
say.
SELECT Cal_Date, Cal_DOW, Cal_DOW_Ordinal
FROM Calendar
WHERE (Cal_DOW = 'Fri' AND
Cal_DOW_Ordinal = 3);
I left the structure of the calendar table as an exercise.
I used Excel to calculate the values once, put them under revision
control, then used a text-processing tool to generate SQL INSERT
statements from the values.