Previous Topic

Next Topic

Book Contents

Book Index

Stored Queries

Stored Query Maintain and Run

Click Here for the Procedures this form applies to

What are Stored Queries?

Stored queries are a way of using the standard database language or Structured Query Language(SQL) to retrieve, insert, update or delete information in SchoolPRO. You can use stored queries to gain direct access to the underlying SchoolPRO tables. A large number of stored queries can be stored in SchoolPRO.

When you open the Stored Queries form from the Miscellaneous category of the Main Menu, you will see a list of all the available stored queries on the left of the screen. When you select a stored query from the list, you will see the SQL code in the SQL Syntax query window. With a query selected you can use the Preview / Run Query to execute the SQL code.

Stored Query Export Options

There are also 3 buttons that can be used with queries that display data. These buttons should not be used for queries that are performing an update, insert or delete database function.

Linked GIF Screen Captures

Export to Microsoft Word

Linked GIF Screen Captures

Export to Microsoft Excel

Linked GIF Screen Captures

Export to HTML

If you are familiar with SQL, the columns below the SQL Syntax box display the structure of the tables in SchoolPRO.

Stored Queries (Main Menu > Miscellaneous > Stored Queries)

Field

Description

Add Query

Click to add a query

Delete Query

Click to delete the selected query

Show All Queries

Select to show all queries

Entities? tab

Click to select the entities to export with the stored query

Address? tab

 

Address Type

Select the address type to export with the stored query

Subjects? tab

 

Select by Subject...

Click to select the subjects/classes to export with the stored query

SQL Stored Query Details tab

Query Name

The name of the query

Preview / Run

Click to preview the results of the stored query in a datasheet format or run the stored query to make the requested changes

Category

The category the stored query belongs to

SQL Statement tab

 

Enter the SQL statement here

Comments tab

Module

Select the module to store the stored query in

 

Enter any comments to describe how the stored query works

T&Q tab

 

Tables

Select to view all the tables in the current module

Queries

Select to view all the queries in the current module

Fields in the selected table / query

List of the fields within the selected table or query

Done

Click to close the form

In This Section

Entering a Stored Query

Running a Stored Query