To get the nth of a month (n=0 returns the last day of the previous month):
DATE - (EXTRACT(DAY FROM DATE ) - n)
Caution, this works for a single calculation in an IN clause, but when you add a second value you'll get a strange syntax error message.
You must rewrite it as multiple ORed conditions instead.
Don't ask me why the parser insists upon that, as it's automatically rewriting any IN into the same ORed conditions :-)
Dieter
To get the nth of a month (n=0 returns the last day of the previous month):
Caution, this works for a single calculation in an IN clause, but when you add a second value you'll get a strange syntax error message.
You must rewrite it as multiple ORed conditions instead.
Don't ask me why the parser insists upon that, as it's automatically rewriting any IN into the same ORed conditions :-)
Dieter