Ask a Question related to Coldfusion Database Access, Design and Development.
-
Rustywater #1
Query to select unique seasons
Hi,
Could someone please tell me what the select statement for MSACCESS would be
to select the number of times a player appears in the following table, where
the season is unique. Eg. If a player plays in two teams in one season we only
want to count that row once....
Player / team / season
1 / 1 / 1
1 / 2 / 1
2 / 1 / 1
3 / 1 / 1
1 / 1 / 2
2 / 1 / 2
2 / 2 / 2
In the above, player one plays in 2 seasons (this is the result I'm after),
but played in 3 teams over the two seasons.
thanks
Tanya
Rustywater Guest
-
Unique Form inserting into many tables using unique id
I have a Registration Form that have 3 steps. The data could be inserted into many (4) tables. Some data corresponding to a one table (the main or... -
summing data based on football seasons
Hi, I have 3 tables season, fixture and scorers. season is defined as: seasonID int(11) name varchar(20) with data like: -
Query of Query to select a title first letter
The column "title" exists in a normal query. Need to select the first letter of the titles to build a list for a prev-next alphabetical search. ... -
Using < and > in a select query
I am trying to write a select query to recieve results between two date ranges i have got these lines in my cfquery tag (example): and... -
Select after insert to the unique column
On Wed, Dec 08, 2004 at 14:50:04 +0100, Julian Legeny <legeny@softhome.net> wrote: Depending on what you really want to do, you could do each... -
gwgiswebmaster #2
Re: Query to select unique seasons
SELECT COUNT(DISTINCT Season) WHERE Player = [your value here]
gwgiswebmaster Guest
-
Rustywater #3
Re: Query to select unique seasons
I had actually tried that, as well as just SELECT COUNT(season) from players
where player=#player#, which only ever returns a value of 1. But when trying
the above suggestion script dies with "Syntax error (missing operator) in query
expression 'COUNT(DISTINCT season)'. "
Tanya
Rustywater Guest
-
Rustywater #4
Re: Query to select unique seasons
This works..
select DISTINCT <column> from <table> where <x> = <y>
Rustywater Guest



Reply With Quote

