Front Office Football Central  

Go Back   Front Office Football Central > Archives > FOFC Archive
Register FAQ Members List Calendar Mark Forums Read Statistics

Reply
 
Thread Tools
Old 09-22-2007, 08:36 AM   #1
gottimd
Dearly Missed
(9/25/77-12/23/08)
 
Join Date: Nov 2003
Location: DC Suburbs
PING: Microsoft Access Guru's

I am using the Interrogator built by gstelmack to automate some of my reporting process within access rather than using excel sumifs and vlookups. The problem is, is that I can't seem to get a simple query working. My query looks like this:



I am just trying to pull games played over the career here, and the result is:



Why is it showing so many games played? We only have had 10 seasons, (2004 to week 6 in 2013). What am I doing wrong here?
__________________
NAFL New Orleans Saints GM/Co-Commish
MP Career Record: 114-85
NAFL Super Bowl XI Champs
In memory of Gavin Anthony: 7/22/08-7/26/08

gottimd is offline   Reply With Quote
Old 09-22-2007, 08:48 AM   #2
cartman
Death Herald
 
Join Date: Nov 2000
Location: Le stelle la notte sono grandi e luminose nel cuore profondo del Texas
You are getting a cartesian join, which means it is summing up the total games played for a player times the number of players on the team. In SQL I would know how to write the query, but Access is just enough different that it wouldn't work. You might try to put the GamesPlayed before the TeamName column and see if that helps.
__________________
Thinkin' of a master plan
'Cuz ain't nuthin' but sweat inside my hand
So I dig into my pocket, all my money is spent
So I dig deeper but still comin' up with lint
cartman is offline   Reply With Quote
Old 09-22-2007, 08:53 AM   #3
gottimd
Dearly Missed
(9/25/77-12/23/08)
 
Join Date: Nov 2003
Location: DC Suburbs
Thanks for the quick reply, but that didn't work either. Still showing as playing thousands of games.

Man this is frustrating!
__________________
NAFL New Orleans Saints GM/Co-Commish
MP Career Record: 114-85
NAFL Super Bowl XI Champs
In memory of Gavin Anthony: 7/22/08-7/26/08
gottimd is offline   Reply With Quote
Old 09-22-2007, 08:56 AM   #4
cartman
Death Herald
 
Join Date: Nov 2000
Location: Le stelle la notte sono grandi e luminose nel cuore profondo del Texas
Do you really need the team name in the query? I think if you drop the Teams table from the query, then you'll get the results you are looking for.
__________________
Thinkin' of a master plan
'Cuz ain't nuthin' but sweat inside my hand
So I dig into my pocket, all my money is spent
So I dig deeper but still comin' up with lint
cartman is offline   Reply With Quote
Old 09-22-2007, 09:36 AM   #5
gottimd
Dearly Missed
(9/25/77-12/23/08)
 
Join Date: Nov 2003
Location: DC Suburbs
Nope, I tried that too. Thanks for the suggestions though.
__________________
NAFL New Orleans Saints GM/Co-Commish
MP Career Record: 114-85
NAFL Super Bowl XI Champs
In memory of Gavin Anthony: 7/22/08-7/26/08
gottimd is offline   Reply With Quote
Old 09-22-2007, 10:18 AM   #6
lordscarlet
Pro Starter
 
Join Date: Oct 2005
Location: Washington, DC
go to the "SQL" view and paste that here.
__________________
Sixteen Colors ANSI/ASCII Art Archive

"...the better half of the Moores..." -cthomer5000
lordscarlet is offline   Reply With Quote
Old 09-22-2007, 10:26 AM   #7
knolysis
n00b
 
Join Date: Aug 2007
I would guess the Mappings table has more than 1 row in it. From the output of the query, it doesn't look like you are using the table. Try removing it from the query to see if that helps the situation.
knolysis is offline   Reply With Quote
Old 09-22-2007, 10:28 AM   #8
henry296
College Starter
 
Join Date: Oct 2000
Location: Pittsburgh, PA
I think it is the mappings table that is causing the multiple counts.
__________________
"It's a great day for hockey" - "Badger" Bob Johnson
henry296 is offline   Reply With Quote
Old 09-22-2007, 02:37 PM   #9
Antmeister
Pro Starter
 
Join Date: Dec 2003
Location: At the corner of Beat Street and Electric Avenue
Quote:
Originally Posted by henry296 View Post
I think it is the mappings table that is causing the multiple counts.

Yes, please delete Mappings from the query. On top of that, please check to see if you set the relationships between the tables prior to creating the query.

If neither of those work, send me a PM and I will give you my email to send it to me.
__________________
"I'm ready to bury the hatchet, but don't fuck with me" - Schmidty
"Box me once, shame on Skydog. Box me twice. Shame on me. Box me 3 times, just fucking ban my ass...." - stevew
Antmeister is offline   Reply With Quote
Old 09-22-2007, 10:10 PM   #10
gottimd
Dearly Missed
(9/25/77-12/23/08)
 
Join Date: Nov 2003
Location: DC Suburbs
Thanks all, got it to work! It was the mappings file.

Ok, so now I have a ton of queries to do all the league, career and rookie leaders and macros to import the data from the interrogator. Next question is, I used the Macros in Access and used the "Transfertext" from the drop down to import the csv's, how do I erase the contents of the table without deleting the tables in the macro? They way I have it, everytime I import it will append to the bottom and the data will grow exponentially in duplicate.

How easy is it to set up an SQL to link to this Access database?
__________________
NAFL New Orleans Saints GM/Co-Commish
MP Career Record: 114-85
NAFL Super Bowl XI Champs
In memory of Gavin Anthony: 7/22/08-7/26/08

Last edited by gottimd : 09-22-2007 at 10:11 PM.
gottimd is offline   Reply With Quote
Old 09-22-2007, 10:46 PM   #11
henry296
College Starter
 
Join Date: Oct 2000
Location: Pittsburgh, PA
You can use a delete query to delete all records but maintain an empty table with the same structure.
__________________
"It's a great day for hockey" - "Badger" Bob Johnson
henry296 is offline   Reply With Quote
Old 09-23-2007, 04:54 PM   #12
marcmoustache
H.S. Freshman Team
 
Join Date: Jun 2005
Quote:
Originally Posted by henry296 View Post
You can use a delete query to delete all records but maintain an empty table with the same structure.

Gottimd, you can put these delete queries in your macros too.
marcmoustache is offline   Reply With Quote
Old 09-23-2007, 04:55 PM   #13
marcmoustache
H.S. Freshman Team
 
Join Date: Jun 2005
Quote:
Originally Posted by gottimd View Post
How easy is it to set up an SQL to link to this Access database?

What SQL d/b are you trying to link from?
marcmoustache is offline   Reply With Quote
Old 09-23-2007, 07:24 PM   #14
gottimd
Dearly Missed
(9/25/77-12/23/08)
 
Join Date: Nov 2003
Location: DC Suburbs
I am using the interrogator and importing them into a DB for now on my local computer. Now I just need help getting them online
__________________
NAFL New Orleans Saints GM/Co-Commish
MP Career Record: 114-85
NAFL Super Bowl XI Champs
In memory of Gavin Anthony: 7/22/08-7/26/08
gottimd is offline   Reply With Quote
Old 09-23-2007, 08:37 PM   #15
GoldenEagle
Grizzled Veteran
 
Join Date: Dec 2002
Location: Little Rock, AR
Access should generate a SQL statement for you, but you will probably need some minor changes to get it to work for the web. In Access, go to your query and then go to SQL view and paste that statement here.
__________________
Xbox 360 Gamer Tag: GoldenEagle014
GoldenEagle is offline   Reply With Quote
Old 09-24-2007, 06:41 AM   #16
gottimd
Dearly Missed
(9/25/77-12/23/08)
 
Join Date: Nov 2003
Location: DC Suburbs
Current Year QB TD Passes:
Quote:
SELECT TOP 15 [Player Game Stats].Year, Teams.TeamName, [Historical Player].LastName, [Historical Player].FirstName, Mappings.Position, Sum([Player Game Stats].TDPasses) AS SumOfTDPasses
FROM (Teams INNER JOIN (([Player Game Stats] INNER JOIN [Active Player] ON [Player Game Stats].PlayerID = [Active Player].PlayerID) INNER JOIN [Historical Player] ON [Active Player].PlayerID = [Historical Player].PlayerID) ON Teams.Index = [Player Game Stats].Team) INNER JOIN Mappings ON [Active Player].Position = Mappings.Index
GROUP BY [Player Game Stats].Year, Teams.TeamName, [Historical Player].LastName, [Historical Player].FirstName, Mappings.Position, [Active Player].Experience, [Active Player].PlayerID
HAVING ((([Player Game Stats].Year)=2013) AND ((Sum([Player Game Stats].TDPasses))>0))
ORDER BY Sum([Player Game Stats].TDPasses) DESC;

So do I just copy, import my Access DB from my local machine to the site on the network? If so, how? Its rather large with all of the queries, should I just keep a template of the three standard queries I want (Career, Rookie and League Leaders)?
__________________
NAFL New Orleans Saints GM/Co-Commish
MP Career Record: 114-85
NAFL Super Bowl XI Champs
In memory of Gavin Anthony: 7/22/08-7/26/08

Last edited by gottimd : 09-24-2007 at 06:59 AM.
gottimd is offline   Reply With Quote
Old 09-24-2007, 11:00 AM   #17
GoldenEagle
Grizzled Veteran
 
Join Date: Dec 2002
Location: Little Rock, AR
The size is fine. Are you just making it where others can download the Access DB or you wanting to put the information on to a website?
__________________
Xbox 360 Gamer Tag: GoldenEagle014
GoldenEagle is offline   Reply With Quote
Old 09-24-2007, 05:07 PM   #18
gottimd
Dearly Missed
(9/25/77-12/23/08)
 
Join Date: Nov 2003
Location: DC Suburbs
Quote:
Originally Posted by GoldenEagle View Post
The size is fine. Are you just making it where others can download the Access DB or you wanting to put the information on to a website?

I want to put it on our website.
__________________
NAFL New Orleans Saints GM/Co-Commish
MP Career Record: 114-85
NAFL Super Bowl XI Champs
In memory of Gavin Anthony: 7/22/08-7/26/08
gottimd is offline   Reply With Quote
Old 09-24-2007, 09:37 PM   #19
GoldenEagle
Grizzled Veteran
 
Join Date: Dec 2002
Location: Little Rock, AR
What type of programming language are you going to use?
__________________
Xbox 360 Gamer Tag: GoldenEagle014
GoldenEagle is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is On
Forum Jump


All times are GMT -5. The time now is 02:22 PM.



Powered by vBulletin Version 3.6.0
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.