I want to check, if the member was active during '2013-01-01 and withdrawal_date. Now withdrawal_date can be anything really, it can be '2014-01-05' or '2010-05-02'....
And I'm using resigned_date as a field to check with, If the member was active during that period( '2013-01-02 and withdrawal_date), it would mean they resigned after that period('2013-01-01 and withdrawal_date)
I tried to do CASE statement but I can't get it right
((b_dt_resigned BETWEEN '2013-01-01' AND withdrawal_date) AND (b_dt_resigned > '2013-01-01'))
sorry, but I am absolutely lost in the question. Tried to read it several times, but still no idea. What tells me, that a member was active? How should I understand "active during ..."? What is withdrawal_date and what is resigned_date? Why are the dates 20130101 and 20130102 mentioned explicitly, is it some constant for the comparison?
You say that you tried CASE, but then post a code that does not contain any CASE, and uses previously not mentioned column "b_dt_resigned" ... ?
And what is the desired result? Just a Yes/No? Or some date range, number of days...?
Please try to explain the question better... and add table definition and some sample data + desired output for this.