473,386 Members | 1,817 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Displaying a Name

49
I have a database of football players names, their names appear more than once if the table, i.e a players name might be there 10 times, the initial name is just a short version for ease, i then have a second field with their full name, but this only appears once, I want to do a sum of all their goals scored but display their full name that appears once and not their short name that appears 10 times or more.

SELECT Players.PlayerName, Sum(Players.Goals) AS SumOfGoals
FROM Players
WHERE (((Players.Goals)>0) AND ((Players.LeagueCup)="league"))
GROUP BY Players.PlayerName, Players.Team
HAVING (((Players.Team)="first"));

I use this at the moment, but this diplays their short name, their full name is DisplayName

Can anyone help????
Oct 6 '06 #1
3 1206
PEB
1,418 Expert 1GB
Where is stored their full name?

In separate table or in the same table?

If in separate table do a join with this table in your query!

JOIN by Short name and invoke your full name!

:)
Oct 8 '06 #2
Milkstr
49
The full name is stored in the same table, but the full name only appears in one of the entries.
Oct 12 '06 #3
PEB
1,418 Expert 1GB
Hi,
So the structure of your table isn't well done! It should be great if you have a table with players where you have short name and full name and table with scores... Where you have the sort name and the score for each match...

In this case it will be very easy to link the short names results to your full name...

In your case there is always possibility to do it...

So you need to save a query with 2 columns short and full name...

It should be like:

Select ShortName, FullName FROM Soccers GROUP BY ShortName, FullName WHERE len(ShortName)>0 AND Len(FullName)>0;

Save this query as soccers_names, but remember! You should change the fields and the table with your own!

When it is done, add this query to the query that you have done, link the 2 views by ShortName and invoke FullName from soccers_names and it should work!

:)
Oct 21 '06 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: Gregory | last post by:
Hello, I've managed to build two web pages, one that can display images with associated text data in a table, and one that can resize and display images without the text. I'd like to resize the...
1
by: Waguih Boctor | last post by:
Hi, I have a number of ASP pages where some JPGs and GIFs are displaying in the browser and some are not. I have included an excerpt from the HTML below. In this example, the gif file at the...
4
by: Les Juby | last post by:
Can someone please help with a suggestion as to how I can keep the formatting (carriage returns) that the user enters into a memo field and then display that later. I figured I might be able to...
4
by: MrL8Knight | last post by:
Hello, I am trying to build a simple php form based shopping cart using a cookie with arrays. I need to use 1 cookie because each order will have over 20 items. With that said, I realize I need to...
2
by: pe3no | last post by:
Hi, First of all - sorry for my silly question and the horribly strange way of using XML by me - I'm an XML n00b :) :) :) I'm trying to write a short guide - putting everything in one file.xml...
0
by: paragguptaiiita | last post by:
I have one problem regarding displaying text from XML file. I have a XSL variable named $p = (0 0 0) (0.82 0 0) (1.63 -0.01 0) (2.63 -0.01 0) (3.63 -0.01 0) (4.63 -0.01 0) (5.63 -0.02 0) (6.63 -0.02...
0
by: paragguptaiiita | last post by:
I have one problem regarding displaying text from XML file. I have a XSL variable named $p = (0 0 0) (0.82 0 0) (1.63 -0.01 0) (2.63 -0.01 0) (3.63 -0.01 0) (4.63 -0.01 0) (5.63 -0.02 0) (6.63 -0.02...
11
by: dba | last post by:
Have been displaying data from database using html for some time but just recently trying to display data back to "form". Can't find answer. <form method="post" action="<?php echo $PHP_SELF;?>">...
1
by: littlealex | last post by:
IE6 not displaying text correctly - IE 7 & Firefox 3 are fine! Need some help with this as fairly new to CSS! In IE6 the text for the following page doesn't display properly - rather than being...
7
by: RichB | last post by:
I am trying to get to grips with the asp.net ajaxcontrol toolkit, and am trying to add a tabbed control to the page. I have no problems within the aspx file, and can dynamically manipulate a...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
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,...

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.