
ACT Data WarehouseQueriesDB2WikiSQL Executer (db2)Link Family
Did You Get What You Wanted?
|
| bromberg |
|
Using the Standard SQL Query Library
Using the Standard SQL Query Library
The following instructions give a brief introduction on using the Standard Query Library. The following step-by-step procedures explain how to choose a query, change values (parameters) within a query, and execute a query to produce your custom query results.
Choosing a query:
-
Access the Standard Query Library from DataLink's main page:
http://datalink.ucsd.edu
-
Click on the link-enabled word, Browse located under the Standard Query Library heading. This displays the Standard Query Library's main page.
- The Standard Query Library presents Data Warehouse database queries by subject area and within each subject area by category. Each category contains pre-written queries. These queries have been written and stored in this library because they retrieve data that is thought to be of interest to various UCSD campus departments.
- If a query in the Standard Query Library produces results having the type of data you desire, you may execute that query to achieve your own customized results. You do not have to rewrite the query. In most cases, values (parameters) within the query will need to be changed to produce your specific results.
- YOU DO NOT MAKE ANY CHANGES TO THE QUERY IN THE STANDARD QUERY LIBRARY.
-
Click on the link-enabled phrase that best represents the subject area you desire.
-
The page that is returned displays a list of common queries in your chosen subject area.
-
Click on the query description that describes the query you desire. This will link you to the query statement.
-
You will see the following information about the query displayed on the screen: name, description, and query.
- PLEASE NOTE: Values in the query that are highlighted in red are referred to as parameters. By changing these parameters, you can 'customize' the query to produce data that meet your specific requirements.
- Click on the Load Query button located below the query. The Load Query button will launch the SQL Executer, and will copy the query to the "SQL to Execute" area of the web-based SQL Executer.
-
Enter you user-id and password in the correct data entry areas of the SQL Executer.
Changing Parameters in the Query and Executing the Query:
-
Go to the query in the SQL to Execute area. This is where you make the changes to the query parameters.
-
The parameters that can be changed are represented by question marks. Delete the question marks, and enter the values you need for your search.
-
When replacing parameters within a query:
- Do not have any extra characters or spaces within the value
- If the query uses quotes around a value, make sure you do include them. Single quotes or double quotes can be used, but not one of each.
- (If you would like to view the query on the Standard Query Library site, click on your browser's [Back] button. You can navigate back and forth between the Standard Query Library and the SQL Executer form.)
-
Click on Submit Query. This submits the query containing the parameters you supplied. Data will be returned to the screen.
-
Click three times on your browser's [Back] button to return to the main page of the Standard Query Library.
-
Click on the Data Warehouse button in the column on the left. This will retrieve the main page of the Data Warehouse.
|