Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Relational algebra wikipedia , lookup
Microsoft Access wikipedia , lookup
Entity–attribute–value model wikipedia , lookup
Extensible Storage Engine wikipedia , lookup
Microsoft Jet Database Engine wikipedia , lookup
Open Database Connectivity wikipedia , lookup
Clusterpoint wikipedia , lookup
Microsoft SQL Server wikipedia , lookup
Introduction to MS Query in Synergetic Ian MacRae Introduction to MS Query © 2016 THE HUTCHINS SCHOOL Agenda • Course outline • Lab outline – accessing lab / lab files • Before recess • Recess to lunch • Lunch to end © 2016 THE HUTCHINS SCHOOL Course outline • Module 1: Introduction and basics of Microsoft Query • Module 2: Mail merge and advanced Microsoft Query • Module 3: Pivot tables and pivot charts • Extra: Future students © 2016 THE HUTCHINS SCHOOL Lab outline • The lab is virtual • Based on a Windows 10 environment with Office 2016 • Using Citrix virtual desktop for the entire course • All lab files are on the virtual desktop © 2016 THE HUTCHINS SCHOOL Demonstration: Virtual Lab Environment © 2016 THE HUTCHINS SCHOOL Module 1: Introduction and Basic Microsoft Query © 2016 THE HUTCHINS SCHOOL Chapter 1: Introduction © 2016 THE HUTCHINS SCHOOL Introduction • Databases are everywhere • Everyday we use possibly hundreds of databases without even realizing – – – – • SharePoint Website Email Synergetic MS Query is a tool that can be used to retrieve data from databases © 2016 THE HUTCHINS SCHOOL Introduction (continued) • We will cover – Basic database concepts (tables, views, joins) – Basic queries – More complex queries – Using the result sets for: • Mail merges • Pivot tables and pivot charts © 2016 THE HUTCHINS SCHOOL Chapter 2: Learning outcomes © 2016 THE HUTCHINS SCHOOL Learning outcomes At the conclusion of this session, participants should be able to: • Understand the benefits and disadvantages of MS Query when compared to other tools like Crystal Reports. • Know how Word and Excel integrate with MS Query. • Understand the purpose of MS Query to extract data from the database. • Recognise views and other base tables. • Understand Synergetic naming conventions for views, tables and fields. • Know how to create a query using the Query wizard. • Know how to create a query without using the Query wizard. • Change a query. • Copy SQL statements from a query to email to support. • Copy SQL statements from support back into a query. • Understand the basics of an SQL statement. • Create a mail merge using retrieved data in Microsoft Word. • Create PivotTables and PivotCharts from retrieved data in Microsoft Excel © 2016 THE HUTCHINS SCHOOL Chapter 3: Database fundamentals © 2016 THE HUTCHINS SCHOOL Database fundamentals • A database can be viewed as a kind of electronic filing cabinet – It is a repository for computerised data files. • Like most filing cabinets, there is a “system” of management. Databases are no different. Most of the time, when people refer to “databases”, they mean Database Management Systems (DBMS) • The DBMS provides mechanisms for retrieving, adding, updating, and deleting files in the filing cabinet. © 2016 THE HUTCHINS SCHOOL Database fundamentals (continued) • Databases are made up of tables. – Each table has fields which define what data is stored in that table – A record is a single entry of data in that table • A simple phonebook is similar to a database table Surname Title Initials Address HomePhone MobilePhone Adams Mr JM 9876 5432 0414 300 300 Adams Mrs AF 21 Minerva Street, Doncaster 5 High Street, Eastbourne 9123 4567 0321 111 111 Adamski Mr G 9000 9800 Brown Ms JAD 303 Burwood Hwy, Burwood East 2 Main Street, Maintown 8989 2001 0422 232 232 Bruce Mr M 2/53 Dixon Ave, Ringwood 9880 2222 045 345 344 THE HUTCHINS SCHOOL Demonstration: Adding information to flat file © 2016 THE HUTCHINS SCHOOL Database fundamentals (continued) • Fundamental concept behind a database is to remove duplication • Anywhere that information is duplication a new table is created, and that information is referenced. • Big advantage: – Updates: Update in one place, all references updated • Big disadvantage: – Deletes: Delete a referencing record, do you delete the referenced record? © 2016 THE HUTCHINS SCHOOL Chapter 4: Synergetic © 2016 THE HUTCHINS SCHOOL Synergetic • Synergetic database management system – Three main databases • SynergyOne • SynergyOneFinance • SynergyOneMedia – One extra • SynergyOneFoundation – Scratch database • SynergyOneScratch © 2016 THE HUTCHINS SCHOOL Synergetic (continued) • Synergetic is accessed through several methods – Desktop client on Windows only – Web client • Community Portal • SynWeb • SynMobile • All of these access the DBMS through an Application Programming Interface (API), interpreting the data and presenting it in a readable format © 2016 THE HUTCHINS SCHOOL Synergetic (continued) • Microsoft Query directly accesses the DBMS. It does not go through the API. Therefore there is no interpretation of the results. © 2016 THE HUTCHINS SCHOOL Excel Spreadsheet (Copy Grid Contents to Excel) Synergetic Windows Application Crystal Report Excel Spreadsheet (Crystal Reports Available) Synergetic Web Application Synergetic Databases MS Query Synergetic (continued) • Synergetic has thousands of tables, each storing a specific aspect of information • To get any useful information, it is necessary to access several tables © 2016 THE HUTCHINS SCHOOL Synergetic views • A view is a “super table” that combines base tables into one big, read-only table. • The information can be from: – Base tables – Combined tables or views – Generate fields Synergetic views (continued) • All Synergetic views start with the lowercase letter “v” • All user Synergetic views start with “uv” • For example vStudentContactAddress – All information needed to create mailing list to the contacts of year 11 students. – Has fields from base tables such as FileYear and ID – Direct fields, but renamed for readability, e.g. StudentContactSurname – Generated Fields such as StudentContactAddressFull © 2016 THE HUTCHINS SCHOOL Synergetic views (continued) • The hardest part is getting started – knowing which view to use. • Synergetic has provided two useful reports to find fields in a view • These can be found in System System Crystal Reports Available Synergetic views and security • All areas of Synergetic are controlled by security permissions • Views are no exception. Not all views will be available to all users • If a particular view is required, please consult with the IT department. © 2016 THE HUTCHINS SCHOOL Synergetic views • You will almost exclusively use Synergetic views • There are two exceptions – Community table – Lookup tables © 2016 THE HUTCHINS SCHOOL Activity: Finding views Estimated 15 minutes © 2016 THE HUTCHINS SCHOOL Chapter 5: MS Query Basics © 2016 THE HUTCHINS SCHOOL MS Query • All MS Query actions are performed in Microsoft Excel • Before you start any query – have some idea of what you expect from the results. • Choose Data From Other Data Sources From Microsoft Query • Unless you are creating a query for finance, you want the SynergyOne datasource © 2016 THE HUTCHINS SCHOOL Exercise: MS Query wizard • Follow instructions in section 5.1 to use the MS Query wizard to create Exercise 1.xlsx • Answer the questions: 1. Where these what you expected? 2. Did you expect this many results? 3. What are all these unknown addresses? © 2016 THE HUTCHINS SCHOOL Exercise: MS Query • Follow instructions in section 5.2 to use the MS Query without the to create Exercise 2.xlsx • Answer the same questions: 1. Where these what you expected? 2. Did you expect this many results? 3. Did we deal with the unknown addresses? © 2016 THE HUTCHINS SCHOOL MS Query: Connection properties • Connection properties control how the query interacts with Excel • The main properties that are likely to change are: – Name – Refresh the data when opening the file © 2016 THE HUTCHINS SCHOOL Unlinking the query • Normally, you want changes in Synergetic to be updated in your query, but there are times when you wish to prevent that from happening. To do that, you can unlink your file from the query. • This will permanently unlink the query from the file. Any changes made in Synergetic will not be reflected in the file. © 2016 THE HUTCHINS SCHOOL Demonstration: Unlinking the file © 2016 THE HUTCHINS SCHOOL Returning to the query • There are many ways to return to edit a query. • The easiest is to right click in the query, to select Table Edit Query © 2016 THE HUTCHINS SCHOOL Demonstration: Editing a query THE HUTCHINS SCHOOL Data properties • The data properties define how the query interacts with Excel when refreshing. • Most often changed are the formatting and layout options – Include row numbers – Preserve column sort/filter/layout – Adjust column width – Preserve cell formatting © 2016 THE HUTCHINS SCHOOL Parameters • Parameters are used to change filters whenever you refresh the data. • To add a parameter, set the value of the filter to square brackets [] • To give the parameter a prompt, enter the prompt between the square brackets, eg [Enter a year level] © 2016 THE HUTCHINS SCHOOL Demonstration: Adding a parameter © 2016 THE HUTCHINS SCHOOL Activity: Adding parameters Estimated 15 minutes © 2016 THE HUTCHINS SCHOOL Module 2: Mail merge and advanced Microsoft Query © 2016 THE HUTCHINS SCHOOL Chapter 6: Mail merge © 2016 THE HUTCHINS SCHOOL Exercise: Word mail merge wizard • Follow instructions in section 6.1 to use the Word mail merge wizard with the Exercise 1.xlsx file to create a label mail merge. • Save the file as Exercise 3.docx © 2016 THE HUTCHINS SCHOOL Exercise: Word mail merge wizard • Follow instructions in section 6.1 to use the Word mail merge wizard with the Exercise 1.xlsx file to create a label mail merge. • Save the file as Exercise 3.docx © 2016 THE HUTCHINS SCHOOL Saving mail merge files • When saving mail merge files, it is important to save them with the source file. • You cannot have a source file stored on SharePoint • If you save your source file on SharePoint, to reuse it you must: – Copy it to the local computer – Perform all necessary actions – If needed, copy the changed file back © 2016 THE HUTCHINS SCHOOL Exercise: Word mail merge letter without wizard • Follow instructions in section 6.2.1 to create a Word mail letter with the Exercise 2.xlsx file. • This exercise includes modification of the Exercise 2.xlsx file to include new fields. • The Exercise 3a Template.docx file is in the Lab Files folder on the desktop • Save the file as Exercise 3a.docx © 2016 THE HUTCHINS SCHOOL Exercise: Modifying date format • Follow instructions in section 6.2.2 to update the date format • Date formats are inconsistent across applications and versions of those applications. – Some use the regional settings of the computer, others do not. – Some can be overridden © 2016 THE HUTCHINS SCHOOL Currency formatting • All fields can be modified in a similar manner. • Another common format option is currency • To format currency use: – \# 0 for rounded whole numbers – \# ,0 for rounded whole numbers with a thousand separator – \# ,0.00 for numbers accurate to two decimal places, with a thousand separator – \# $,0 for rounded whole dollar with a thousand separator – \# "$,0.00;($,0.00);'-'" for currency, with brackets around negative numbers and a hyphen for 0 values © 2016 THE HUTCHINS SCHOOL What do the symbols mean? • \ begins the switch. It tells Word that there is a formatting option following • The next character tells it what type of formatting – @ is a date format – # is a number format – * is a text format • Text formatting can be applied to numbers. The results can be interesting. • \*alphabetic This switch displays results as alphabetic characters. The result has the same case as the word "alphabetic" in the field code. For example, { SEQ appendix \* ALPHABETIC } displays B (instead of 2), and { SEQ appendix \* alphabetic } displays b. © 2016 THE HUTCHINS SCHOOL Exercise: Filling in the blanks • Follow instructions in section 6.2.3 to handle the exception cases where there is no email address • Continue on to complete 6.2.4 and add the gender specific pronoun © 2016 THE HUTCHINS SCHOOL Viewing the field codes • When working with field codes it is sometimes necessary to see the hidden codes such as the If…then…else… merge field codes. • The key combination [Alt-F9] toggles between viewing field codes and final document. • You can also right click on any field to toggle it individually © 2016 THE HUTCHINS SCHOOL Exercise: Possessive nouns • Section 6.2.5 uses a formula in Excel to add a new field to calculate a name with the correct possessive. © 2016 THE HUTCHINS SCHOOL Other field switches • Word has many different types of fields, not just merge fields • General switches that work with all fields relating to how they are presented – Upper case, lower case, title case, first capital • Field specific switches are specific for that type of field. • For merge fields there are options to – Insert text before and after the field if it is not blank – Use vertical formatting (one character under the other) – Use a mapped field © 2016 THE HUTCHINS SCHOOL Fixing broken source / using a different source • If you want to use a different source, or there is something changed in the original source (like a field name) you can fix this. • When opening a merge file you are prompted with a security warning © 2016 THE HUTCHINS SCHOOL Fixing broken source / using a different source continued… • Select Mailings Select Recipients Use an Existing List…. • Select the new source • When you preview your document, you will be prompted to match the changed fields if needed © 2016 THE HUTCHINS SCHOOL Chapter 7: Advanced MS Query © 2016 THE HUTCHINS SCHOOL Structured Query Language • Structured Query Language (SQL) is a computer language • Used (mainly) by DBMS • Also used by programmers to interact with DBMS © 2016 THE HUTCHINS SCHOOL SQL statement types • Many SQL statement types – Data manipulation • SELECT, INSERT, UPDATE, MERGE, DELETE – Transaction control • COMMIT, ROLLBACK – Session control • ALTER SESSION, SET ROLE – System Control • ALTER SYSTEM © 2016 THE HUTCHINS SCHOOL SELECT Statement SELECT vStudentContactAddress.ID, vStudentContactAddress.Given1, vStudentContactAddress.Surname, vStudentContactAddress.YearLevel, vStudentContactAddress.StudentGender, vStudentContactAddress.StudentContactAddressFull, vStudentContactAddress.StudentContactMailName, vStudentContactAddress.StudentContactMailSalutation, vStudentContactAddress.FileYear, vStudentContactAddress.FileSemester, vStudentContactAddress.CurrentSemesterOnlyFlag, vStudentContactAddress.StudentBirthDate, vStudentContactAddress.StudentContactDefaultEmail, vStudentContactAddress.StudentContactEmail, vStudentContactAddress.StudentContactOccupEmail FROM SynergyOne.dbo.vStudentContactAddress vStudentContactAddress WHERE (vStudentContactAddress.CurrentSemesterOnlyFlag=1) ORDER BY vStudentContactAddress.Surname, vStudentContactAddress.Given1 © 2016 THE HUTCHINS SCHOOL SELECT Statement SELECT vStudentContactAddress.ID, vStudentContactAddress.Given1, vStudentContactAddress.Surname, vStudentContactAddress.YearLevel, vStudentContactAddress.StudentGender, vStudentContactAddress.StudentContactAddressFull, vStudentContactAddress.StudentContactMailName, vStudentContactAddress.StudentContactMailSalutation, vStudentContactAddress.FileYear, vStudentContactAddress.FileSemester, vStudentContactAddress.CurrentSemesterOnlyFlag, vStudentContactAddress.StudentBirthDate, vStudentContactAddress.StudentContactDefaultEmail, vStudentContactAddress.StudentContactEmail, vStudentContactAddress.StudentContactOccupEmail FROM SynergyOne.dbo.vStudentContactAddress vStudentContactAddress WHERE (vStudentContactAddress.CurrentSemesterOnlyFlag=1) ORDER BY vStudentContactAddress.Surname, vStudentContactAddress.Given1 © 2016 THE HUTCHINS SCHOOL SELECT Statement SELECT vStudentContactAddress.ID, vStudentContactAddress.Given1, vStudentContactAddress.Surname, vStudentContactAddress.YearLevel, vStudentContactAddress.StudentGender, vStudentContactAddress.StudentContactAddressFull, vStudentContactAddress.StudentContactMailName, vStudentContactAddress.StudentContactMailSalutation, vStudentContactAddress.FileYear, vStudentContactAddress.FileSemester, vStudentContactAddress.CurrentSemesterOnlyFlag, vStudentContactAddress.StudentBirthDate, vStudentContactAddress.StudentContactDefaultEmail, vStudentContactAddress.StudentContactEmail, vStudentContactAddress.StudentContactOccupEmail FROM SynergyOne.dbo.vStudentContactAddress vStudentContactAddress WHERE (vStudentContactAddress.CurrentSemesterOnlyFlag=1) ORDER BY vStudentContactAddress.Surname, vStudentContactAddress.Given1 © 2016 THE HUTCHINS SCHOOL SELECT Statement SELECT vStudentContactAddress.ID, vStudentContactAddress.Given1, vStudentContactAddress.Surname, vStudentContactAddress.YearLevel, vStudentContactAddress.StudentGender, vStudentContactAddress.StudentContactAddressFull, vStudentContactAddress.StudentContactMailName, vStudentContactAddress.StudentContactMailSalutation, vStudentContactAddress.FileYear, vStudentContactAddress.FileSemester, vStudentContactAddress.CurrentSemesterOnlyFlag, vStudentContactAddress.StudentBirthDate, vStudentContactAddress.StudentContactDefaultEmail, vStudentContactAddress.StudentContactEmail, vStudentContactAddress.StudentContactOccupEmail FROM SynergyOne.dbo.vStudentContactAddress vStudentContactAddress WHERE (vStudentContactAddress.CurrentSemesterOnlyFlag=1) ORDER BY vStudentContactAddress.Surname, vStudentContactAddress.Given1 © 2016 THE HUTCHINS SCHOOL SELECT Statement SELECT vStudentContactAddress.ID, vStudentContactAddress.Given1, vStudentContactAddress.Surname, vStudentContactAddress.YearLevel, vStudentContactAddress.StudentGender, vStudentContactAddress.StudentContactAddressFull, vStudentContactAddress.StudentContactMailName, vStudentContactAddress.StudentContactMailSalutation, vStudentContactAddress.FileYear, vStudentContactAddress.FileSemester, vStudentContactAddress.CurrentSemesterOnlyFlag, vStudentContactAddress.StudentBirthDate, vStudentContactAddress.StudentContactDefaultEmail, vStudentContactAddress.StudentContactEmail, vStudentContactAddress.StudentContactOccupEmail FROM SynergyOne.dbo.vStudentContactAddress vStudentContactAddress WHERE (vStudentContactAddress.CurrentSemesterOnlyFlag=1) ORDER BY vStudentContactAddress.Surname, vStudentContactAddress.Given1 © 2016 THE HUTCHINS SCHOOL Aggregating data • SQL statements can also be used to aggregate and group data SELECT vStudents.StudentCampus, vStudents.StudentReligionCode, Count(*) FROM SynergyOne.dbo.vStudents vStudents WHERE (vStudents. CurrentSemesterOnlyFlag =1) GROUP BY vStudents.StudentCampus, vStudents.StudentReligionCode ORDER BY vStudents.StudentCampus, vStudents.StudentReligionCode © 2016 THE HUTCHINS SCHOOL Using SQL statements in MS Query • SQL statements can be entered directly into MS Query • Start MS Query as per normal. Do not use the wizard • Do not add any tables. • Open the SQL window by selecting View SQL • Either type in, or copy and paste an SQL statement in the window © 2016 THE HUTCHINS SCHOOL Demonstration: Adding an SQL statement to MS Query © 2016 THE HUTCHINS SCHOOL Using Crystal Report queries • Many Crystal Reports in Synergetic are based on SQL statements. • You can use these statements in your own queries • Open the report and complete the selection criteria • Hold down the <Shift> key and click the Preview button • This will display the View SQL Query Window • You can copy this into the SQL statement area of MS Query © 2016 THE HUTCHINS SCHOOL Demonstration: Using Crystal Report query in MS Query THE HUTCHINS SCHOOL Dates and times in MS Query • Dates and times in queries are inconsistent • Some use a time stamp format – ts ’19:03:2016 15:04:04:01’ • Others use GMC offset format – 03:29:00 GMT +10 • Others use local time format © 2016 THE HUTCHINS SCHOOL Linking tables • Sometimes a view on its own does not have sufficient information and additional tables or views are required • This is the most common cause of problems in databases • Great care needs to be taken that tables are correctly linked • Special attention needs to be paid to the results to ensure they are what is expected © 2016 THE HUTCHINS SCHOOL Exercise: Adding in tables • Follow instructions in section 7.4 to modify the Exercise 1.xlsx file to add in the vAwards table • Save the file as Exercise 4.xlsx © 2016 THE HUTCHINS SCHOOL Joins • Joins are the SQL mechanism re used to link tables and views • Using the incorrect type of join leads to unexpected, incomplete, or excessive results. • Always have an idea of what you expect the outcome to be before you start • Start small. Filter for even one record. Once you get that right, expand your filters to check your joins each step of the way © 2016 THE HUTCHINS SCHOOL Inner joins • Default join • Joins two tables where there is an exact match • Returns only data where the record exists in both tables. All other records are not returned • The number of records should be less or the same © 2016 THE HUTCHINS SCHOOL Outer joins • There are two types of outer joins – Left outer join and right outer join – MS Query only supports left outer join • A left outer join returns all records from the left table (the primary table) and those records from the right table (the secondary table) where there is a matching record. • The number of records usually does not exceed the number of records in the primary table © 2016 THE HUTCHINS SCHOOL Demonstration: Different types of joins and their effects © 2016 THE HUTCHINS SCHOOL Activity : Joining tables Estimated 15 minutes © 2016 THE HUTCHINS SCHOOL Finance tables and views • All finance tables and views are stored in a different database – SynergyOneFinance • You need to select the SynergyOneFinance database when creating a new query • You must have permission to the finance tables and views to do this © 2016 THE HUTCHINS SCHOOL Demonstration: Enrolment deposits and cash receipts finance tables © 2016 THE HUTCHINS SCHOOL Activity : Joining finance tables Estimated 15 minutes © 2016 THE HUTCHINS SCHOOL Joining finance and non-finance tables • To join tables from a different database, select the database from the dropdown option in the Add Tables window © 2016 THE HUTCHINS SCHOOL Payroll tables and views • Payroll tables (and consequently views) are have an additional level of encryption on them • They must be decrypted before they can be accessed • The necessary permission in payroll is required 1. Run the Synergetic client 2. Open the Payroll module 3. Select Authenticate and enter the current password 4. Start MS Query in the normal manner © 2016 THE HUTCHINS SCHOOL Tag lists and MS Query • Tag lists are extremely useful in Synergetic and in MS Query • You can create almost any report based on a tag list in Synergetic • Almost all selection grids have the ability to select tagged ID’s • You can access you current tagged list through the view vTagsOwn © 2016 THE HUTCHINS SCHOOL Exercise: Using tag lists • Follow instructions in section 7.6 – Tag 5 students in Synergetic – Modify the query in Exercise 3.xlsx to add the vTagsOwn table – Save the result as Exercise 5.xlsx – Modify Exercise 3a.docx file to link to Exercise 5.xlsx – Save as Exercise 5.docx – Tag 5 different students – Return to Exercise 5.xlsx and refresh the data. Save the file. Close Excel – Return to Exercise 5.docx and observe the change in the mail merge © 2016 THE HUTCHINS SCHOOL Saving tag lists • Tag lists can be saved for later retrieval – Private tag lists are saved for 30 days and are then deleted – Public tag lists are saved indefinitely. • Tag lists can be loaded from Excel © 2016 THE HUTCHINS SCHOOL Demonstration: Loading a tag list from a list of IDs © 2016 THE HUTCHINS SCHOOL © 2016 THE HUTCHINS SCHOOL Module 3: Pivot tables and pivot charts © 2016 THE HUTCHINS SCHOOL Chapter 8: PivotTables and PivotCharts © 2016 THE HUTCHINS SCHOOL What are Pivot tables and charts? • Pivot tables and pivot charts are an Excel tool that is used to summarise large amounts of “numerical” data and represent it graphically • • “Numerical” means can be represented as a number – Single letters – Numbers – Roman numerals – Certain Arabic character – Time and dates The grouping can be on almost any field that can be sorted – There is a limitation on the number of distinct grouping to a field © 2016 THE HUTCHINS SCHOOL Exercise: Create a PivotTable • Objective is to answer these question on the summative results of students for 2015 term 4 1. What was different rating levels across each of the mini schools? 2. Which house does the best (academically) in each school? 3. Which year level is most at risk? © 2016 THE HUTCHINS SCHOOL Exercise: Create a PivotTable continued … • Follow instructions in section 8.1 – Create an MS Query to retrieve all the summative assessment results for 2015 term 4 for all students – Create a PivotTable that shows the mini school, house and year level, summarising the total of each type of result. • – Add a linked PivotChart – Add a slicer for MiniSchool Analyse the results to answer the questions © 2016 THE HUTCHINS SCHOOL Exercise: Add parameter to the query • • Follow instructions in section 8.2 to add parameters to the query – Add a parameter for FileYear and FileSemester – Add a wildcard parameter for AssessAreaResultGroup – Add a filter for StudentGender=‘M’ Return the results to Excel and retrieve the information for 2014, Term 2, Result Group 4 • Observe the PivotTable and PivotChart. Why do they not change? © 2016 THE HUTCHINS SCHOOL Refreshing PivotTables and PivotCharts • Even though PivotTables and PivotCharts are linked to data tables, they are not automatically updated with the data tables. • An extra step is required to refresh the PivotTable itself. – Select the PivotTable – Select Data Refresh All or right click and choose Refresh – If the PivotChart is linked to the PivotTable it is automatically refreshed, otherwise it too will need to be separately refreshed © 2016 THE HUTCHINS SCHOOL Chapter 9: Future Students © 2016 THE HUTCHINS SCHOOL Exercise: Future student pivot tables • Follow instructions in section 9.1 to create several future student based pivot tables – Future student application summary of statuses – Future student summary of application priorities © 2016 THE HUTCHINS SCHOOL Prospectus automated mail merge • The enquiries module has the capacity for an automated mail merge to prospective parents by using a stored procedure • This only works if the enquiries module is being actively used © 2016 THE HUTCHINS SCHOOL Exercise: Create a prospective parent mail merge • Follow instructions in section 9.2 to prospective parent mail merge • This uses a Stored Procedure to extract the data and update Synergetic records at the same time © 2016 THE HUTCHINS SCHOOL Future student activity • Any future student activity can be included in a mail merge • This involves setting the MailRequestFlag for the activity. All activities of that type from that time on, will be affected by this change • The stored procedure crspFutureActivityPrint ‘<CODE>’ is used for this © 2016 THE HUTCHINS SCHOOL Future student status changed • A mail merge can be set up to notify parents of future students that the status of their application has changed. • This requires several lookup tables to be pre-polulated • Once populated, the stored procedure crspFutureStatusChangedPrint ‘F’ is used to extract all those whose status has changed to ‘F’ © 2016 THE HUTCHINS SCHOOL Chapter 10: Additional Resources © 2016 THE HUTCHINS SCHOOL Lynda.com • Hutchins has a subscription to Lynda.com • An online training facility with thousands of training resources • Covers most computer related topics across all skill levels • Suggested topics are: – Word 2016 Essential Training – Excel 2016 Essential Training – Mail Merge in Depth with Word 2016 – Excel productivity tips © 2016 THE HUTCHINS SCHOOL Pivot Tables • Some PivotTable resources – Step by step videos – Where and why you should use PivotTables – What are PivotTables – Formatting pivot tables © 2016 THE HUTCHINS SCHOOL Learning outcomes At the conclusion of this session, participants should be able to: • Understand the benefits and disadvantages of MS Query when compared to other tools like Crystal Reports. • Know how Word and Excel integrate with MS Query. • Understand the purpose of MS Query to extract data from the database. • Recognise views and other base tables. • Understand Synergetic naming conventions for views, tables and fields. • Know how to create a query using the Query wizard. • Know how to create a query without using the Query wizard. • Change a query. • Copy SQL statements from a query to email to support. • Copy SQL statements from support back into a query. • Understand the basics of an SQL statement. • Create a mail merge using retrieved data in Microsoft Word. • Create PivotTables and PivotCharts from retrieved data in Microsoft Excel © 2016 THE HUTCHINS SCHOOL THANK YOU THE HUTCHINS SCHOOL 71 Nelson Rd, Sandy Bay, Tasmania, Australia 7005 T (03) 6221 4200 www.hutchins.tas.edu.au Follow ‘The Hutchins School’