Home
Tutorial
Help Pages
Installation Guide
 
Tutorial Start
Register for a new system
Log in
Create a new User Group
Create a new User
Create a new Data Store
Browse for a Template
Use a Template
Modify Data Class
Delete a Data Class
Create a new Data Class
Add a single item
Add multiple items
Edit an item
Query for items (simple)
Query for items (advanced)
Save a query
Run a saved query
Edit a saved query
Delete a saved query
Save a Template
View Usage Log
Save Usage Report
Clear Usage Log
Modify Display Settings
Log Out
Browse as a Public User

Query for Items (advanced)

Query for items (simple) Save a query

You just used the simple interface for querying for items. The advanced querying interface allows you to use SQL to query the database. If you don't know SQL, then this is your chance to learn.

1. Return to the Data Store Home Page.

2. Select the edit icon next to the Data Views heading and then the add icon next to the Advanced Queries heading.

3. In the Advanced Query page, use Ctrl-Click to select both the Treatment and Study Subject Data Classes to view details. Click the Display button.

4. A window will pop up displaying the database schema for these two Data Classes. The schema details must be used for creating the SQL query statement.

5. Enter the following SQL statement into the edit box:

SELECT s.subject_id "Subject Name",s.category "Addiction",s.sex "Gender",t.drug "Snack",t.amount "Number (per day)" FROM snack_Animal_Subject s, snack_Treatment t WHERE s.treatment=t.oid ORDER BY t.amount

6. Select the Submit button.

7. You will be directed to a table displaying the results from the SQL query.

Next you will save this query so that it can be easily accessed again in the future.

Query for items (simple) Save a query