Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 Query to get one row result from many rows

Author  Topic 

Johnyalm
Starting Member

49 Posts

Posted - 2005-09-02 : 06:06:46
I have one table for a psychological test that holds general information about the test. For scoring on each dimension of the test there are another table.

So

tblTEST = general info
tblSCORES = specific info scores for each dimension

Now I would like to search the tblTEST and then join tblSCORES - for EACH dimension and get ONE row for each taken test like this:

tblTEST tblSCORE tblSCORE tblSCORE
ID test dim#1 dim#2 dim#3

1 / 45 / 34 / 21
2 / 34 / 23 / 34
3 / 45 / 23 / 24

So for each ID in tblTESTS I have to do 3 selects in tblSCORE!

Is there any way to do that?

Johny

www.mirrorgate.com

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2005-09-02 : 06:28:48
Post table structures, sample data and the result you want

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

Johnyalm
Starting Member

49 Posts

Posted - 2005-09-02 : 14:43:16
OK, I will post the tablestructure and som examples tomorrow!

www.mirrorgate.com
Go to Top of Page
   

- Advertisement -