locked
Report results different than query data RRS feed

  • Question

  • I am working with ACCESS 2013 and my project is working with basketball stats.

    After several queries, I get what seem to good results for career 3 pt baskets made - in particular showing: (1) name, (2) total made and (3) years played.  When I run the report from this query, the name and total made are correct, but everybody's career shows as a single season instead of their career.

    Examples: V.D.  2004-05 instead of 2004-08

    L.F.  2011-12 instead of 2008-12

    R.D.  2012-2013 instead of 2012-2016

    J.C. 2014-2015 instead of 2012-2016

    I have 6 tables (1) Game_Stats, (2) Games, (3) Input_Season_Stats, (4) Players, (5) Roster_Info and (6) Seasons where either Stats for each individual Game or the whole Season are entered.  Many players will have both individual games and season stats for the same season.  For many seasons, season stats are not available.

    Here is the SQL:

    SELECT TOP 35 [53_V_Seas_3ptM_Query].Player_ID, [Players].[FirstName] & " " & [Players].[LastName] AS Full_Name, Sum([53_V_Seas_3ptM_Query].Max_3ptM) AS SumOfMax_3ptM, [Years_Var_#4_Query].Career_Years
    FROM 53_V_Seas_3ptM_Query INNER JOIN [Years_Var_#4_Query] ON [53_V_Seas_3ptM_Query].Player_ID = [Years_Var_#4_Query].[Years_Var_#3_Query].[Years_Var_#2_Query].[Years_Var_#1_Query].Players.Player_ID
    GROUP BY [53_V_Seas_3ptM_Query].Player_ID, [Players].[FirstName] & " " & [Players].[LastName], [Years_Var_#4_Query].Career_Years
    HAVING ((([Players].[FirstName] & " " & [Players].[LastName]) Not Like "zz*"))
    ORDER BY Sum([53_V_Seas_3ptM_Query].Max_3ptM) DESC , [Years_Var_#4_Query].Career_Years;

    In advance Thank you for your time, interest, ideas and help.

    And, I will try to clarify concerns.

    Tuesday, August 16, 2016 5:29 PM

All replies

  • Hi jlwood44,

    it is better you first try to execute [Years_Var_#4_Query].Career_Years and check that you get years correctly or not.

    if possible please post the table design of years table and picture of data that you had enter in the years field.

    and post the Years_Var_#4_Query.

    so that we can try to look in to that and help you to fetch the year correctly. then you can modify the changes in above query.

    Regards

    Deepak


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Wednesday, August 17, 2016 4:10 AM