main logo
Subject: Re: Need some advice
Author: Ruslan Zasukhin
Posted: 2001/05/30 03:43:58
 
View Entire Thread
New Search


on 5/30/01 1:10, Mennenoh, David at dmennenoh /at/ ivm-inc DO.T com wrote:

> I have a DB with multiple tables. Table 'Demo' contains student information
> - then there are multiple quiz tables named 'Quiz1', 'Quiz2', etc. and these
> contain the quiz scores for this module and the name of the instructor that
> taught this quiz module. Hope this makes sense...

> So, I have a search screen where the user can fill in fields and I construct
> an SQL query based on the fields they filled in. I am having a problem though
> - how could I let them type in an instructors name for instance?

> I need to select the student info. from the 'Demo' table and then info from
> multiple Quiz tables too. I can't figure out how to do this.

> My SQL statement is going something like:
>
> Select * from Demo,Quiz1 Where Demo.ID=Quiz1.ID and Quiz1.InstName='John
> Paul'
>
> That's not so bad but how do I query more tables based on the InstName field
> - each Quiz table has an InstName field.
>
> Would I do:
>
> Select * from Demo,Quiz1,Quiz2 Where Demo.ID=Quiz1.ID and Demo.ID=Quiz2.ID
> and Quiz1.InstName='John Paul' or Quiz2.InstName='John Paul'
>
> That would get awfully unwieldy if I had say 10 Quiz Tables. I'm using my
> own ID field, FWIW.
>
> Am I missing something? Is there an easier way to do this query?

David, I also think you need to have just ONE quiz table. May be as score
you need an other table.

Student Quiz
Score



--
Best regards,
Ruslan Zasukhin

-------------------------
Paradigma.

e-mail: ruslan@paradigmasoft.com
web : http://www.paradigmasoft.com

To subscribe to the Valentina mail list
send a letter to valentina-on /at/ lists DO.T macserve.net



-------------------------------------------------------------
The Valentina mailing list is brought to you by MacServe.net
For info on lists services, see http://www.macserve.net/lists.html
 
©2001 Ruslan Zasukhin
<-- Prior Message New Search Next Message -->