Re: Query Logic

From: <exec_at_chicagorsvp.com>
Date: Tue, 16 Sep 2008 14:11:08 -0700 (PDT)
Message-ID: <e9a70a07-40af-43f2-a512-16b3a1f230d4@26g2000hsk.googlegroups.com>


On Sep 16, 3:58 pm, sybra..._at_hccnet.nl wrote:
> On Tue, 16 Sep 2008 12:29:58 -0700 (PDT), e..._at_chicagorsvp.com wrote:
>
> >Hi All,
>
> >We've got this data:
>
> >FLAG DATE      MEMBER_ID
> >--   --------- -----------
> >A    12-SEP-08  1072604574
> > I     03-DEC-07  1072604574
> >A    09-MAR-07  1072604574
>
> >What we want to do is the increment seperate counters for each month
> >in which the member was active, shows by the letter A.
>
> >This data shows that the customer was active on 9/9/07.  He
> >inactivated himself on 12/3/07.  Then, he reactivted himself on
> >9/12/08.
>
> >So, we want to have seperate counters for the months the member was
> >active, which means March/07 thru November /07, then again on
> >Septermber/08.
>
> >Not sure how to actually catch the months between the time he
> >activated and inactivated.  Trying a bunch of IF/ELSE statements, but
> >that is getting just too crazy to code.......
>
> >Any thoughts on this?  Even tried a loop for each month, but even that
> >does not work because even though there is no entry, he was active in
> >May of 07........
>
> >Much Regard
>
> Apparently you are mtek.
> Please don't post the same homework using two different email accounts
> or nicks.
> Did you try anything? Apparently not.
> Joining the table with itself, or using the LAG datawarehouse
> function, you should be able to get the 'previous' record, and
> calculate the number of months between two dates.
>
> Yes, this answer does require reading documentation, it does require
> you to do some work, and you badly want others to do your homework for
> free; I won't fall into that trap.
>
> --
> Sybrand Bakker
> Senior Oracle DBA- Hide quoted text -
>
> - Show quoted text -

Huh? I'm a bit lost on your comment dude. You don't want to answer, that is fine with me. But you should get your balls straight, cuz I have no clue what mtek or whatever is......

Weird guy..... Received on Tue Sep 16 2008 - 16:11:08 CDT

Original text of this message