This topic is locked

Query against 2 related tables

2/25/2005 2:42:17 PM
ASPRunnerPro General questions
B
baltrusj author

Is is possible to query against 2 related tables in ASPRunner? It seems the "search" or "advanced search" are limited to whichever table is open. So for instance, if I have the master-detail relationship set up for 2 tables: Student_Demos (a student name, ID, ethnicity, gender, etc.) and Student_Grades (student course marks by subject, year, etc). The primary and foriegn key linking the 2 tables is the student ID, ie: each individual student can have many course(s) mark(s).
So, How can I query or search both tables at once: e.g.: male reading grades from 2004?
Any help is always appreciated.

Joe

Sergey Kornilov admin 2/25/2005

Joe,
I would recommend to create an additional query/view in your database that pulls data from two joined tables and use this query as a datasource in ASPRunnerPro.

B
baltrusj author 2/25/2005

So Sergey are you suggesting I create a query/table that merges all the data from both tables to enable a search (advanced) on that one table thus allowing users to query/search for the information they want?
Or are you saying within ASPRunner I can create an other query/view that can pull the data from the two tables? If so, where/what step would this be at?
You're the best.

Joe

Sergey Kornilov admin 2/25/2005

Joe,
yes, I recommend to create a query that pulls data from two joined tables. You can do this either in your database or on the SQL query step in ASPRunnerPro.