Home » SQL & PL/SQL » SQL & PL/SQL » what method is used in decrementing of cnt from day 13
what method is used in decrementing of cnt from day 13 [message #202758] Sat, 11 November 2006 15:52 Go to next message
sanotsh
Messages: 5
Registered: March 2005
Junior Member
can any one tell me what method is used in decrementing of cnt from day 13


day 0 - i call for first time - cnt=1 - flag=0,
day 7 - no call - cnt=0 - flag=0,
day 8 - i call - cnt=1 - flag=0,
day 10 - i call - cnt=2 - flag=0,
day 12 - i call - cnt=3 - flag=0,
day 13 - i call - cnt=4 - flag=1,
day 15 - no call - cnt=3 - flag=1,
day 17 - no call - cnt=2 - flag=1,
day 19 - no call - cnt=1 - flag=1,
day 20 - no call - cnt=0 - flag=0,


conditions :

1. if no call for continous 7 days - cnt=0, if cnt=0, then flag=0
2. if call cnt > 3 in 7 days - flag=1
3. diff between 15-day and 8-day is 7
diff between 17-day and 10-day is 7

on 16th day, i make call, on 16th cnt should be 4 as per logic,
but is coming as cnt=5.

i'm not understanding , how decrementing is working ???
Re: what method is used in decrementing of cnt from day 13 [message #202772 is a reply to message #202758] Sun, 12 November 2006 04:44 Go to previous messageGo to next message
rleishman
Messages: 3724
Registered: October 2005
Location: Melbourne, Australia
Senior Member
Have a read over your post again, and consider what it might look like to someone who is not actually living inside your head. ./fa/1659/0/

Consider this: if your question was not posted on an Oracle site, is there any way a casual reader could know that it was Oracle related? (Of course, it might not be Oracle related at all?)

Have another go at trying to explain what you are doing. Post the code you have already tried, and the results you are getting, demonstrating exactly WHAT does not work, and what it should really look like.

Ross Leishman
Re: what method is used in decrementing of cnt from day 13 [message #202997 is a reply to message #202772] Mon, 13 November 2006 08:38 Go to previous messageGo to next message
joy_division
Messages: 4640
Registered: February 2005
Location: East Coast USA
Senior Member
Ross:

Your smiley looks to me like a guy who is getting ready to bowl, with the bowling ball held up in front of his face. And a BIG ball at that.
Re: what method is used in decrementing of cnt from day 13 [message #203089 is a reply to message #202997] Mon, 13 November 2006 19:26 Go to previous message
rleishman
Messages: 3724
Registered: October 2005
Location: Melbourne, Australia
Senior Member
Excellent. You've ruined it for me now. Wink

I only ever say a crystal ball, suggesting to the OP that he must consider us psychic.
Previous Topic: SQL Query - Update performance
Next Topic: Reference a Varray Type
Goto Forum:
  


Current Time: Sun Dec 04 16:46:57 CST 2016

Total time taken to generate the page: 0.14901 seconds