Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I would like your help to identify the best way to do a search for which codes were active on a given date.
I suppose you want to analyze the active codes on the date 31/08/2002.
The rule I understand to be the correct one would be:
- Adhesion is less than the date of analysis (31/08/2002)- (Exclusion is null or Exclusion > date of analysis (31/08/2002))
So I have the following example data:
The codes in bold fit the rule, so it would have 7 active codes until the date of 31/08/2002.
if I were to build this in SQL, it would look something like this:
whereto_date(Adhesion)<= to_date('31/08/2021')and (Exclusionis null or to_date(Exclusion)> to_date('31/08/2021') )
How could I write this into an SetAnalysis ?
PS: Translate on Google