Sometimes you may have a query that has already been perfected on another system. You can either:
In this example, we will follow the process when someone from the Synergetic Management Systems team emails you a SQL statement. This Structured Query Language (SQL) statement is written in a language that database management systems can interpret. Synergetic uses the Microsoft SQL Server database management system.
In this example, we will use a simple SQL statement that will report and total all religion codes at your organisation:
Query |
SELECT vStudents.StudentCampus, vStudents.StudentReligionCode, Count(*) FROM Synergetic.dbo.vStudents vStudents WHERE (vStudents.CurrentSemesterOnlyFlag=1) GROUP BY vStudents.StudentCampus, vStudents.StudentReligionCode ORDER BY vStudents.StudentCampus, vStudents.StudentReligionCode |
This statement selects campus, religion code and places a count field on your spreadsheet. The fields:
To paste in a SQL statement that has been sent to you by email:
The Choose Data Source window is displayed.
The SQL Server Login window is displayed.
Note: This is your usual Synergetic username and password.
The Add Tables window is displayed.
The SQL window is displayed.
The SQL statement is copied to the clipboard.
The SQL statement is pasted into the SQL window.
The Microsoft Query window is updated with the new criteria and the records are displayed.
Last modified: 26/05/2017 5:15:04 PM
© 2017 Synergetic Management Systems. Published 20 July 2017.