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
 Development Tools
 ASP.NET
 CrossTab Query?

Author  Topic 

robsbiz
Starting Member

3 Posts

Posted - 2006-02-10 : 09:04:47
I have a table in an SQL db and I wonder if it is possible to write a crosstab query in an ASP to retreive values for calcuation based on this query.

The table has the following fields

UserID
QID
AID
DimID
TypeID
ColmID
Score


I would like to create a query that would in effect have UserID, TypeID, and a 'Score' expression as row headings, Dimensions as column headings, and SumOfScoring.
the 'Score' expression is calculated as:
the sum of Scoring in each row, divided by the number of questions that relate to TypeID, multiplied by 10, rounded to the nearest integer.

I am way out of my depth on this and any pointers would be greatly appreciated

robsbiz
Starting Member

3 Posts

Posted - 2006-02-10 : 09:19:16
[quote] I should have added that the column heading would be DimID.
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2006-02-10 : 09:54:04
http://weblogs.sqlteam.com/jeffs/archive/2005/05.aspx

Madhivanan

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

- Advertisement -