Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello all,
I would like to count the records in a table, all those that meets this condition: fiels PostingDate OR field OpeningDate OR field ClosingDate is in a date range (between StartDate and EndDate)
So I have tried with:
count ({<PostingDate = {"<=$(StartDate)>=$(EndDate)"} >} ReturnID) +
count ({<OpeningDate = {"<=$(StartDate)>=$(EndDate)"} >} ReturnID) +
count ({<ClosingDate = {"<=$(StartDate)>=$(EndDate)"} >} ReturnID)
But it can count a record more than once, because the same record can meet the three conditions so it would be counted more than once.
If I write it this way:
count ({<PostingDate = {"<=$(StartDate)>=$(EndDate)"},OpeningDate = {"<=$(StartDate)>=$(EndDate)"} ,ClosingDate = {"<=$(StartDate)>=$(EndDate)"} >} ReturnID)
It will only count the records that meet the three conditions.
So, how could I write it so it works like an OR?
Many thanks in advance.
Hello,
You can try this :
count ({<PostingDate = {"<=$(StartDate)>=$(EndDate)"}>+<OpeningDate = {"<=$(StartDate)>=$(EndDate)"} >+<ClosingDate = {"<=$(StartDate)>=$(EndDate)"} >} ReturnID)
Martin
Hello,
You can try this :
count ({<PostingDate = {"<=$(StartDate)>=$(EndDate)"}>+<OpeningDate = {"<=$(StartDate)>=$(EndDate)"} >+<ClosingDate = {"<=$(StartDate)>=$(EndDate)"} >} ReturnID)
Martin