473,513 Members | 2,421 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

counting specific ecords

Ok, first off, thanks to Bob for all the previous help. I got things running
smooth now.

My next dilemma isn't from that tour that I inherited, but on my own golf
server.

On this, only the loser reports the match. So here are my fields.

username iloser idate

the username is the winner of the match, the iloser is the loser of the
match and idate is of course the date and time the match was played.
What I want to do, is figure out a winning and losing streak. SO it would
need to count to see the most current streak. So I think it would take idae
= Now() and look backwards to see how many times the person's name shows up
in the username field until it sees the same name in the iloser field. this
would say how many wins the person has for that streak. Does this make
sense?
Bam
Dec 24 '05 #1
5 1349
Was actually hoping I could do this in Access, instead of doing it server
side. Here is my SQL that I have so far.

SELECT rounds.UserName, Sum(quniroundWithMatches.Win) AS Wins,
Sum(Abs([Win]=0)) AS Losses, Sum(1) AS Total_Games, Sum([Win])/Count(*)*100
AS WinPct, Format(WinPct,"0.00") & "%"
FROM quniroundWithMatches INNER JOIN rounds ON
quniroundWithMatches.UserName=rounds.UserName
GROUP BY rounds.UserName;
Is there someway that I can put the streaks in here??

"Jeff" <gi*****@adelphia.net> wrote in message
news:FY********************@adelphia.com...
Ok, first off, thanks to Bob for all the previous help. I got things
running smooth now.

My next dilemma isn't from that tour that I inherited, but on my own golf
server.

On this, only the loser reports the match. So here are my fields.

username iloser idate

the username is the winner of the match, the iloser is the loser of the
match and idate is of course the date and time the match was played.
What I want to do, is figure out a winning and losing streak. SO it would
need to count to see the most current streak. So I think it would take
idae = Now() and look backwards to see how many times the person's name
shows up in the username field until it sees the same name in the iloser
field. this would say how many wins the person has for that streak. Does
this make sense?
Bam

Dec 25 '05 #2
I am thinking about this. It seems like i need to get the most currect
match, and count back records until the name appears in the iloser column,
and get that total. But I just am not sure how to do that.
"Jeff" <gi*****@adelphia.net> wrote in message
news:FY********************@adelphia.com...
Ok, first off, thanks to Bob for all the previous help. I got things
running smooth now.

My next dilemma isn't from that tour that I inherited, but on my own golf
server.

On this, only the loser reports the match. So here are my fields.

username iloser idate

the username is the winner of the match, the iloser is the loser of the
match and idate is of course the date and time the match was played.
What I want to do, is figure out a winning and losing streak. SO it would
need to count to see the most current streak. So I think it would take
idae = Now() and look backwards to see how many times the person's name
shows up in the username field until it sees the same name in the iloser
field. this would say how many wins the person has for that streak. Does
this make sense?
Bam

Dec 25 '05 #3
Nevermind all. I figured out an easy way to do it.

Is there a way to delete an initial post from the NG, like in this case,
where help is no longer needed for this topic??

"Jeff" <gi*****@adelphia.net> wrote in message
news:FY********************@adelphia.com...
Ok, first off, thanks to Bob for all the previous help. I got things
running smooth now.

My next dilemma isn't from that tour that I inherited, but on my own golf
server.

On this, only the loser reports the match. So here are my fields.

username iloser idate

the username is the winner of the match, the iloser is the loser of the
match and idate is of course the date and time the match was played.
What I want to do, is figure out a winning and losing streak. SO it would
need to count to see the most current streak. So I think it would take
idae = Now() and look backwards to see how many times the person's name
shows up in the username field until it sees the same name in the iloser
field. this would say how many wins the person has for that streak. Does
this make sense?
Bam

Dec 25 '05 #4
Jeff wrote:
Nevermind all. I figured out an easy way to do it.

Is there a way to delete an initial post from the NG, like in this
case, where help is no longer needed for this topic??


No, but you can help out other users who are googling for help with their
own problems by posting your solution. :-)

Part of the value of using newsgroups, at least in my experience, is the
opportunity to help others as you receive help.

--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"
Dec 26 '05 #5
Sure thing Bob.

This is what I did.

I created fields in the members table called winSTR loseSTR winSTRbest
loseSTRbest
The winSTR is the current streak, loseSTR is the current losing streak,
winSTRbest is the best winning streak the player has had, and loseSTRbest is
the worse losing streak the player has had.

Now on the reportasp.asp page, since only the loser reports, I put in a few
sql statements.

The first thing it did was set the reporting person's currnet win streak to
0, since he just lost and that is why he is reporting.
Then the next statement added a win the the person who won's current win
streak field.
Then I had it do a check, to see if the current win streak, was better than
the best win streak, if so replace it, if not, continue on.
Then it added one to the losers current losing streak, and checked to see if
that was higher than the worst losing streak, if so, replace it, if not,
continue on, which is closing the connection, and a response.redirect

Not sure if this was the most efficient way of doing it, but it would seem
it would be faster than going through the table of matches (which is about
8000 records). It takes less than a second to process this, so it works fine
for me.
Hope this will help someone
Bam
"Bob Barrows [MVP]" <re******@NOyahoo.SPAMcom> wrote in message
news:OW**************@tk2msftngp13.phx.gbl...
Jeff wrote:
Nevermind all. I figured out an easy way to do it.

Is there a way to delete an initial post from the NG, like in this
case, where help is no longer needed for this topic??


No, but you can help out other users who are googling for help with their
own problems by posting your solution. :-)

Part of the value of using newsgroups, at least in my experience, is the
opportunity to help others as you receive help.

--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"

Dec 26 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
3038
by: Srinath Avadhanula | last post by:
Hello, I am wondering if there is a way of counting graphemes (or glyphs) in python. For example, in the following string: u'\u0915\u093e\u0915' ( or equivalently, u"\N{DEVANAGARI LETTER...
6
2164
by: Elbert Lev | last post by:
Please correct me if I'm wrong. Python (as I understand) uses reference counting to determine when to delete the object. As soon as the object goes out of the scope it is deleted. Python does...
7
1249
by: C White | last post by:
A little while back I had a question about counting records and my example was something like this: in my database table i have the following records john ed john rick tom
3
2050
by: Peter | last post by:
Hi, This post is about counting rows and finding the max count in a group of rows. I'm trying to find the player who scored the most goals in a game. I know how to find out how many goals the...
5
3493
by: ChadDiesel | last post by:
Hello Again, I want to assign a number to each record that will be part of a shipping number. I want the number value to count up until the contract number changes. Then, I want the number to...
34
2105
by: Mo Geffer | last post by:
Greetings: I have a question about the output of the sample program in section 1.5.3 Line Counting of K&R, Second Edition. Here's the program: /****************************************/...
7
2844
by: zets | last post by:
I need a macro for counting the bits in the odd positions of a given input (of any type, char, pointer, int, struct, whatever). Is there any clever way I could not think of, to do it efficiently? ...
16
2137
by: pauldepstein | last post by:
How do I count the number of times I tested a program? My first attempt was this: #include <iostream> using namespace std; int main() {
5
3529
by: sololoquist | last post by:
#define COUNT_UP #include <stdio.h> #define N 10 int main() { int i; #ifdef COUNT_UP for (i = 0; i < N; i++)
3
2772
by: majna | last post by:
I have character counter for textarea wich counting the characters. Special character needs same place as two normal characters because of 16-bit encoding. Counter is counting -2 when special...
0
7264
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7386
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
7106
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7534
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5689
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
3236
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3226
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1601
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
805
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.