# Assumptions

Assumption:
All valid League Names are in "Names, Leagues" Table


Assumption:
All valid Team Names are in "Names, Teams" Table


Assumption:
All valid Season Segment Names are in "Names, Season Segments" Table


Assumption:
The "Career Batting, Main+Out" etc. assume Table "Career Batting" contains ALL sums, >=0 AB


Assumption:
All Valid Season Names are in "Names,Seasons" Table


# ListOfQueries

Comments:
For Replays w/ Players from Multiple Years


Comments:
Added Sname Field fro compatibility with Actuals


Comments:
Changed "Names, Teams" ref to "Franchises


Name:
Comparison: Totals - History of Organization Batting v Pitching


Comments:
New Query to Create Table Listing All Queries


# tblTips

Tip:
You can choose to base leadership eligibility for certain reports either on AtBats (AB) or Plate Appearances (PA).  See 'Set User Options' tool bar button.


Tip:
You can restrict the years to be reported on to an "era" which allows you to define a "window" of time within your full replay stats for reporting purposes.  See 'Set User Options' tool bar button.  Queries from blue menu buttons are era-aware.


Tip:
You can play a .wav file upon starting up the NCD by naming the file "basehit.wav" and placing it in the same directory as your NCD database.  Such a file is available on request.


Tip:
After making a change to tables such as "Franchises" or "Minimums", you should run the "Update ALL" function from the main menu.


Tip:
For your HTML output, you can place an HTML file called NCE1.HTM in the directory: "C:\Program Files\Microsoft Office\Templates\Access".  This file is available on request.  The effect is to add a "Norwood" header and a color background to HTML reports.


Tip:
When prompted to enter "1 to 4 comma-delim segment codes...", you can combine both World Series and Playoff data into one report by entering "1,2".


Tip:
When asked to enter Player Name in Individual Register reports, you can enter just enough characters to identify the one player you're looking for, I.e. "MUS" might get you both Musial,Stan and Muser,Tony, but MUSI might be all you need to get just Stan.


Tip:
Qualification for leadership in "avg" type categories (I.e., BA, ERA, SA, etc.) depends on values in Minimums, Career and Minimums, Season..  If your queries don't show expected players, check to see that they qualify based on values in those tables.


Tip:
Queries from blue menu buttons are era-aware.


Tip:
The "era" feature can be used to turn out leadership reports for individual seasons (like statMaster) just by setting 'era" to a single season and importing that season from BBW.  Be sure to clear out previous stats for that year first.


Tip:
Generate decade leadership boards using the newly enhanced "era" option.  See 'Set User Options' tool bar button.  Queries from blue menu buttons are era-aware.


Tip:
If you want to see Leadership boards in a season in progress, reset values in table "Minimums, Season" to reflect minimums based on your season progress. Import your stats, and set "era" to that season, and user options to "era" Reporting Scope.


Tip:
You should occasionally compress your NCD database.  To do so, press F11, "Tools", "Database Utilities", "Compress Database".  This reduces the file size of your NCD.


# Version

Comments:
Crosstab Queries, Statmaster Exporter v2.13


Comments:
Replay v Actual Comparisions, 4 digit Years, BBWtoACCESS


Comments:
Tuning of Career Leader queries to include choice of team or full file


Comments:
Explosion of Leaders queries to Best Season (1 team and overall), Best Career (1 team and overall)


Comments:
Modified "qSumPitchingStatsByPlayertOnly" to show career teams for pitchers of only those teams he actually pitched for.  

Modified "MiscFunctions" module to add new function "CareerLeadersPitching" to work with modified query.  

Modified "CareerTeams" for batting in "Misc Functions" module to account for building SQL statements where search value contained an apostrophe in the players name.


Comments:
Changed input handling queries to process additional fielding information in table "Fielding": Importer is now providing: Triple Plays(F1); PkOff2(F6); PkOff3(F7), F9 and F10.  

Removed FORMAT statements from queries.


Comments:
Expanded "All Time Leaders" menu to allow choice of any of 4 different "scopes" of report: (1)Career overall; (2)Career with 1 team; (3)Season overall; (4)Season with 1 team.  Query Naming conventions have been applied to these queries such that a query name is prefixed with one of either B1 B2 B3 B4 P1 P2 P3 P4, depending on whether it is a Batting or a Pitching query and which of the 4 scopes it applies to.  Added many of the underlying queries, but still many B3 and P3 type queries remain to be done.

Added some Defensive Cross tab queries.  

Added some "Most Times Leading…" queries.

Added a "Version History" command to the main menu for a report on …


Comments:
Fixed a few minor problems with 2.6 version.


Comments:
Query renaming to better describe function; implement VBA code to calculate # seasons played by batters and pitchers instead of just counting batting or pitching records or getting difference between last year and first year (both techniques ignore the case where a player plays on multiple teams in the same year).

Miscellaneous housekeeping


Comments:
Miscellaneous tuning.  Developed several of the missing career queries. Converted SNAME to integer and inserted it in many queries in place of YEAR.


Comments:
Fixups from 2.73 release.  Added criteria of "greater than zero" to the target statistic in all the B1 B2 B3 B4 P1 P2 P3 and P4 queries.  Fixed "Streak Leaders, Shutout Innings" query for decimal place problem.  Added LEAGUE column to the "Most Times Leading League" queries.  Changed the formula for calculating Games Behind in the "Team - Opponent Differentials" query.


Comments:
Corrected queries "Update, Yearly W-L", "Yearly Results, W-L", and table "Yearly W-L" to fix the Games Behind calculation.


Comments:
Added color (blue) to the featured statistic column in the B1,B3,P1 and P3 queries to highlight them.  Add 2 more Post Season Team Stats queries. Made a new function for pitchers to look up their teams in P3 reports. Other cosmetic changes and tweaks.  Added routines for upgradng from past versions.


Comments:
Cleanup of some 2.77 fallout.  Added command button to DBA menu to facilitate data transfer due to upgrades.  Added explanatory messages for Player Name Changing and Team Name Changing, and well as adding buttons on the DBA form to make user entry more available.


Comments:
Enhanced Data Transfer routines so that users who have not initially imported all 9 basic tables will still be able to transfer what tables they did import.  Fixed a problem with import of Pitching Control value.  Modified 2 crosstab queries (ERA and BA) so that values will now show up for players with less than 400 AB (or less than 154 IP) but will be displayed in magenta instead of deep blue.

Addressed the concept that a franchise might belong to more than one league in its life, I.e., Milwaukee.  Added technique to lookup all leagues a franchise ever had results in and modified these queries to show multiple leagues in the "League" column: "All Time Team Summary"; "Crosstab Team Finishes by Year"; "Finishes, Team"; "Crosstab, Team HRs by Year"; "Crosstab, Team Wins by Year".  Eliminated the importance of the League column in the "Names, Teams" table, and hid the field in the standard table query.


Comments:
(V2.80 was skipped).  Cleaned up some fallout from 2.79 where some queries were still using league from "Names, Teams" table for matching up records.  

Changed the roster queries to require specific team entry, not just first character or two.  A problem had arisen in which "MI" was entered to get Milwaukee stats, but the queries also got "MIN" (Minnesota) because the "MI" criteria found both "MI" and "MIN".  There might be other queries where this will happen.  The best cure is for users to always use the same number of characters for team initials whether it's 2, 3, or 4 characters.   

Added code the Main Menu load routine to insure that there would be a record in the "tblTopvalues" table.  A problem arose when the record was unaccountably missing and "Top X" queries were failing.


Comments:
Added much infrastructure to Division reporting.  Franchise table now is updated by the 'Process Input Data' routines (just after Importer) to insert a record for each team represented by players being imported, along with the League, Division, Team Initials, Team City and Nickname.  This table will serve as the source for Division on all other tables and queries.  The implication is that each team/year is represented by one record in this table with a unique value for Team Initials, and Year.  A teams initials must be unique across all replays.  

In addition, the table "Names, Teams" contains a single record for each team to allow multi-year stats for a given franchise to be reported under a name chosen by the user.  The user can maintain "Names, Teams" as desired.   The Importer process will add a record to this table under the Initials of each team being imported if there is no record with those Initials already present.

Replays which do not use divisions are not impaired.


Comments:
Tuned several Division related queries and macros.  Replaced use of DCOUNT in "Update, Yearly Results W-L" with a Function routine to facilitate conversion of the DB to a VB6 front end.


Comments:
Realigned Main Menu screen as it was being truncated for some users.  Fixed Team Pitching Roster, Team Batting Roster, and Team Fielding Roster reports--team total line was appearing in the middle of the players names instead of at the end.  Added "Fielding Averages by Position" to the Crosstab Queries Menu (although strictly it's not a crosstab query).  Resolved a problem with a missing query "Career Batting, REGULAR SEASON".  The query for "Streak leaders - Walks" was corrected--the actual statistic was missing.  The query, "Crosstab, Individual BA " was corrected--it gave the wrong color for a .000 batting average.  Belatedly put into place several modified queries which depend on minimum values such as AB or IP--queries now examine minimums per table "Minimums Season".

Modified Individual Batting and Pitching Register, plus Team Batting, Pitching and Fielding Roster queries to allow query on All-star seqments (-1).  The league for which the players play will appear in Team; and possible nothing will appear in League or Division for such stats.

The "Yearly Leaders" queries now come in two flavors, leaders for the entire organization, and league leaders within the organization.  Triple Crown Winners query also added.


Comments:
Modified "All Time League Summary" query to handle a potential "divide by zero" problem.  Modified "Team Opponent - Differentials" query to display Sname and Team from the Pitching table instead of the Batting table.

Additional tuning of alignment of Main Menu.  Fixed the "Fielding Averages by Position" query whereby a players fielding stats for all positions were being displayed instead of just those stats accumulated at the position selected for reporting.

Adjusted replay vs. actual queries to compare annual results regardless of whether the player was in more than 1 league.  Previously some inconsistency existed whereby 2 sets of stats (one for each league) were each being compared to composite annual stats.

Added HTML output option to all queries.  Added "Brief Report" to all queries.  NOTE that only some of the queries have actually had a "brief" version created.  See the list of queries with the prefix "(brief)" in the name.  For the others, selecting "Brief report" retrieves the same query as if "brief report" had NOT been selected.

Added Team VS Team reporting.


Comments:
Troubleshooting fixes to release 3.0 including changing the key of GameSummary to include Segment code in order to allow Regular Season, Post Season, and All-Star data to be represented.

Changed the appearance of the menus for a cleaner look by adding colored title bars in each main segment of each menu.

Added button to permit removing only the GameSummary data of a season.  Changed the Name (team and player) Change process to also examine, and change if necessary, the data in GameSummary.  Add GameSummary to the tables included in the Data Transfer process.

Added Max Consec. Wins and Max Consec. Losses queries to team-vs-team menu. Also, most runs, hits, errors in a game.  Also, no-hitters.


Comments:
Fixed bug in Team and Player Name change routines for GameSummary table.

Fixed definition of "Segment" in GameSummary table to be integer, not text.  The import of GameSummary segments from 3.01 will transform values of "-" (minus sign) from the old DB into -1 (minus one) integer.

Fixed All-time team-vs-team query inadvertantly used TeamID and OppTeamID for grouping.  The problem was that the same team will possibly have a different TeamID from one year to the next.

Activated Team Name Changes in Franchise Table.

Minor cosmetic changes.


Comments:
Misc minor changes including adding Multi-hit games to batters statistics.  Queries need to be reviewed to see which need to have Multi-Hit added.


Comments:
Minor fallout from 3.03 release.  City and Team concatenations were leaving spaces after city, now corrected.  Certain integer fields changed to Long in League Pitching and League Batting.


Comments:
Added command buttons for maintenance access to "Name, Seasons", "Minimums", and "Minimums, Season" tables.  Non-Access users had no means to do maintenance to these tables.  Changes several queries which had 400 atbats hard-coded.  Queries now look to "Minimums, Season" for the minimum to use.


Comments:
Added name upper/lower case change feature (Upper Case, Lower Case, Proper Case) for both Players Names and Team City/Nicknames (not Initials).  

Fixed some cosmetic problems: Division name incorrectly being shown in League column in "Batting, Actual" and "Pitching, Actual" columns; Trailing spaces shown for team names.

Added LCS segment code.  Added option in many places for selecting 1 to 4 segment codes for a given query.

Added 2 Career Statmaster-like reports in HTML output format: Career Batting Leaders and Career Pitching Leaders.  This feature allows the user to choose from several color patterns for background, allows the user to toggle on/off column lines in the output, and to specify a report header of his choice.

Added report to show all career stats for a single player in one report.

Modified Actual Vs. Replay query for hitters and pitchers to allow for selection of specific player.


Comments:
Fixed some fallout from 3.06.  Name Case Change logic was backward.


Comments:
Changed all references from NCE (Norwood Career Encyclopedia) to NCD (Norwood Career Database).  Fixed problem where World Series winners (or losers), if they were a wild card team, was not showing up on Pennant Winners query.  Post Season Reports now show whether it's World Series or LCS.  Installed several All-star and World Series inquires initiated by Dick Fischer.  Fixed a problem where League Initials were not showing up for All-Star games.  Added NCD credits to HTML League Leaders and HTML Baseballcard output.  Added option to all B1- and P1- reports to allow leader lists for World Series, LCS, and All-Star Games, in addition to Regular Season.  Add translation of segment codes to English on most output.  For the Post Season Teams Batting Stats and Team Pitch Stats report, added code to show how team got into LCS (Pennant Winner or Wild Card), and, for World Series participants, whether they won or lost.


Comments:
Added a setup-toolbar button to allow the user to decide:
1. To base qualification for batting leadership on Atbats or Plate Aprearances;
2. To set the scope of several reports to either the years defined in "era", or all years imported;
3. To show "Tips" at program startup.

Added toolbar button for program Tips; to change the current segment; to set the current "era".  

Added concept of "era" to many reports giving the user the chance to see category leadership only within the years defined in the era.  If a report is one which is "sensitive" to the defined era, its command button is in blue text.   This feature can be used to turn out leadership reports for individual seasons (like statMaster) just by setting 'era" to a single season.  To do so while a season is in progress, delete all previous records for the season, then import the up-to-date stats.

Added a gradiant background to all menus.


Comments:
Internal fixes: changed the logic which scans user input for which segments to report on.  Other cosmetic changes.

Added two queries: Team winning streaks and losing streaks by year.  Click "Team vs. Team" from the main menu.  These queries use data in the Game Summary table.

Added a crosstab query to show team Winning Percentage by year, and to show the best and worst percents.  Click "Queries Team, League" on the main menu.

Fixed a logic error in Batting, Pitching and Relief Pitching queries, where the relationship between qSumXXXXStateByPlayerOnly and CurrentEra needed to be shown by a 'join' by Seg; and 'Update, Current XXXX" had to be similarly modified.
Corrected the (brief) queries for Career Batting, Career Pitching, and Career Relief Pitching--the era option was inoperative.


Comments:
Additional cleanup from last release.  Tuned queries to allow for more flexibility in reporting leaders in non-standard length seasons (154 or 162 games).  User needs to set desired minimum values in table "Minimums, Season" and in "Minimums".  Added "Minimum Seasons" to list of tables in the "Transfer from previous NCD" file.


Comments:
Menu rearranging: moved "Misc HTMLReport" button from lower left to upper right under Individual Registers"

In "All Time Category Leaders", added a 5th "scope" for "Best Team Performance in a Season" (only some of the scope queries have actually been written; others will show as greyed out).

Completely revamped "Season Leaders by Category" to allow reports of stat leaders for a single team (user to specify team from a list); and to allow user to optionally choose a particular league for league leader reports.

Changed sorting sequence on Fielding roster report.  Inserted fielding position data to that column in the "Misc HTML Report"; previously it has been showing as blank.

Other misc fixes including attempt to fix "type mismatch" error on "Import" process.


Comments:
Renamed a temporary table "TEMP, tblgames" to "TEMP_tblgames" in an attempt to solve a problem some users with certain configurations were having.  Fixed minor problem with "Pitchers vs Teams, Season" query.

Because of rename of above table and corresponding modifications to BBW2ACC (Importer), this version of the NCD requires use of Importer V1.59 or greater, and conversely, V1.59 of the Importer will only work properly with NCD V3.16 (this one) or greater.  

Added crtieria window for concise collection of user selection criteria for Team Roster queries.  Sorting of query is now dynamic based on criteria entered and presents data with subtotals in a more context-sensitive manner.

Removed bitmap background from all menus and saved about 15meg in file size.


Comments:
Fixed a bug which was created in NCD V 3.14 dealing with the Importing of Pitching data.  The NCD's handling of data after the Importer passes data to it is such that a pitcher's starting and relief records, sent to the NCD as separate records, should have been combined.  Process worked properly up to and including  V3.13, but starting with V3.14 did not combine, and therefore for certain queries, showed as two different stat lines for a pitcher.

Advise users who Imported in 3.14 through 3.16 to re-import  OR alternately, the user can run a routine called "CombinePitchingRecords" which will fix things up:

Open your NCD database, press F11, click "Modules", double-click ANY module, click VIEW, then DEBUG WINDOW, type "CALL CombinePitchingRecords" and leave the cursor at the end of the line, press ENTER.  This might take awhile depending on how much replay data is present.  When finished, close the database.  Process is done.

Fixed missing totals in Misc HTML Report output.

Fixed a minor bug whereby BB per Year was miscalculated in the "Most Bases on Balls" category in "Career Leaders HTML Output".


Comments:
Bypassed a warning message about a missing Temp_tblGames object.  Now that Importer allows user not to choose team vs team extraction, the absence of this table might be legitimate


Comments:
Added special Excel import function for importing data manually entered into a specially designed Excel spreadsheet; other misc tuning.


Comments:
Expanded the stat fields that will be searched for on the Special Excel Import process feature.  On most crosstab reports, removed a criteria that required G or AB or IP to be greater than 0 for a player to appear.  This is mainly relevant to Excel-input data.


Comments:
Add an "ALL" capability on Baseball Card HTML output wherein if ALL is selected instead of an individual player, an HTML file is created for each player in the replay. Each file is named after the player, and goes into "C:\My Documents\BaseBallCards".

Provided for  'segment' specification during import of Excel-based data on special spreadsheet layout.

4/16/02 reissued under v3.21 with an expanded table 'Names, Seasons' through the year 2020.


Comments:
Minor maintenance: turned off warnings about "You are about to insert/delete/update x records…".  Added Multi Hit queries thanks to Alan Berger.


Comments:
Started 5/19/02.  Changed the name of team fielding queries to remove reference of MOST or BEST since the user may choose to look at highest/lowest values and some stats (ERA) have the characteristic of being better when lower.  Added Team Best/Worst queries for Total PAs, Total MultiHit Games and Total TBs.  Also added PA queries to the Best-Career and Best-Season batting queries.  Corrected a problem (invalid use of Null) with the Misc HTML reporting query.  Turned off warnings about "You are about to insert/delete/update x records…" occurring during BBW import.

Added DBA menu option to allow user to expand segment types if they choose.  Segs 0, 1, and -1 remain reserved for Regular Season, World Series and All-Star respectively.  For additional post season, user can use positive number values above 1 for as many post season segments as desired.  For multiple all-star games, negative numbers below -1 can be setup.  

Added options to Career Leaders Options to give user option of considering all players for the high/low rankings or confining results only to those players that meet minimum career statistics.  Minimum values are shown and easily modified for a single run of the query.  Also added an option to include or not include players that have a zero value for the queried statistic in a query.

Improved UpperCase Name conversion to take into account names like O'Brien, MacGrath, Smith-Barney, Lawrence (Yogi) Berra, etc.


Comments:
Cleanup of V3.23 regarding segment name displaying and 'ProperCase' setting for last names.


Comments:
Added Windows API code to utilite the Windows file open dialog box for NCD transfer and Excel input file locating.  Modified the Batter qualification logic to handle a null value in PA (from Excel input).


Comments:
Added League Name Change functionality.  Miscellaneous tuning of queries as a result of opening up segment types to user definition.


Comments:
Added a function for use with League Name changes that would allow the user to change all 'blank' league values to "None".  That way, the user can then manipulate the 'Name Changes, League' table more readily.

Modified the World Series Winners query to show the WS loser as well.  Modified the Pennant Winners query by dropping the WS winner/loser columns.

Added the column Intentional Walks (IBB) column to several queries related to Bases on Balls so the user can see how many of the walks were intentional.


Comments:
Added code to speed the transferring of data from an old version of the NCD to the latest as long as no schema changes have taken place.  Reinstated old versions of Pennant Winner query for Alan Berger.  This must be invoked directly from the list of queries by running the query "Pennant Winners-Alan".

Modified several queries to get proper League value to display for All-Star and Post-Season Individual queries.

Added a new page of queries specially authored by David Norwood.  

Modified the code which lists all the players for the 'Baseball Card' HTML-output query.  Previously only players with a batting record showed in the list, but it was discovered that in a Designated Hitter league, pitchers who don't come to the plate, don't get a batting record entered into StatMaster.  The fix now looks at the batters AND pitchers records to populate this list.


Comments:
Improved the appearance of the PROCEED button on the NCD database transfer screen.
Restored the processing of the 'UPDATE ALL' function after a transfer (inadvertantly had been dropped).
Cosmetic changes: fixed 'divide by zero' problems where found and other cosmetic issues.
The "SEC" column was dropped in David's queries and now the Year (Statistics Source Year) is appended to the player name if it is not the same as the replay season.

Improved the 'Remove A Season' process to allow selection of: statistic type; and segment.  Thus, removed all other buttons under 'Remove A Season' on the DBA screen

Added a 'Reset Path…" button to the GDC to identify it's location, if installed.  This link will be used to pinpoint Perfect Games.  This modification will require the user to have version 1.13 of the GDC (not yet published) in order to allow perfect games to be identified.

From David, added "Create No Hitters Table" button that will be fully functional only with V1.13 of greater of the GDC installed on the users system.  Also 2 new queries from David:
    Year Change All Tables (Special use)
    List Seasons, Years, Player Counts (which is an count of players and pitchers by Year-Regular season)

Added an expanded query for 'Yearly Results' that shows Home and Away and Extra Innings records
Added hyperlinks to main menu to facilitate user emailing to author and to access BBW Utilities home page.
Have alternative queries for World Series and Pennand Winners.  See Queries tab in Database window and look for "World Series Champs-Alan", and "Pennant Winners-Alan".

Added new color option for HTML output for MWBL (Midwest Baseball League)


