Author Topic: How to change the Quarters on the session records for all clubs  (Read 1207 times)

Rick Leffler

  • Administrator
  • Sr. Member
  • *****
  • Posts: 339
    • Approved Workman
How to change the Quarters on the session records for all clubs
« on: October 24, 2011, 05:55:49 AM »
Here is an SQL statement to easily adjust the quarters of the session records for all clubs in the specified Club_Year. This is quicker than manually editing them under Admin > Club Setup > Club Calendars.

In this example, I assumed 32 weeks in the club year with 8 weeks per quarter.  You can of course modify as needed. This was tested with AWdb version 5.0.0.7.

Run the backup utility first, then copy the entire block of text below and paste it into the SQL Workbench.
-------------------------------------------------------------------------------------
 
update Club_Session set Quarter = '1st' where Club_Year = '2011-2012' and Week_Number in (1,2,3,4,5,6,7,8);
update Club_Session set Quarter = '2nd' where Club_Year = '2011-2012' and Week_Number in (9,10,11,12,13,14,15,16);
update Club_Session set Quarter = '3rd' where Club_Year = '2011-2012' and Week_Number in (17,18,19,20,21,22,23,24);
update Club_Session set Quarter = '4th' where Club_Year = '2011-2012' and Week_Number in (25,26,27,28,29,30,31,32);
 
Rick at Leffler Systems
Murfreesboro, Tennessee