473,385 Members | 2,003 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Classical Complex challenging Asp and SQL problem

I am woring on a project that involves a common but quite challanging and
complex problem. I describe the scenario with a common example.

School Attendence website:
The school maintains records of attendence of students for each subject
periods in a table with format like

StudentName | Subject | AttendenceDate
ABC | Math | 1/1/2005
ABC | Science | 1/1/2005
BCD | Math | 1/1/2005
CDE | Science | 1/1/2005
..
..
CDE | Math | 31/12/2005

The project needs to present attandence record in the form of table on asp
webpage for different intervals:

Today
This week
This Month
This year

The format should be:

------------------------------------------------------------------
StudentName | 1/1/2005 | 2/1/2005 | ..... | 31/12/2005
------------------------------------------------------------------
ABC | 2 | 1 .....
BCD | 2 | 0 .....
..
..
..
-------------------------------------------------------------------

The data should be presented by Date (Horizontaly) and Number(count) of
attendence for that day for each student (Vertically).

The interval is selected by user and can be Today, This Month, This year

How can be this problem solved in effecient way. Performance is to be
considered for the solution as the real website will be viewed by lots of
users each day.

Thanks in advance
Nov 19 '05 #1
3 1176
"ramata" <ra****@discussions.microsoft.com> wrote in message
news:17**********************************@microsof t.com...
How can be this problem solved in effecient way.


You don't mention what RDBMS you're using, but it sounds like you need a
crosstab query...
http://sqljunkies.com/WebLog/mattnun...08/07/173.aspx
Nov 19 '05 #2
I am using SQL Server 2000

I looked on links you mentioned.

There are few problems with that:

1. Generating an SQL Select query by using the values in Group field will
not help as it will excede the limit of 8000 characters (for whole year
attendence)

2. If I create an new table with date as colums, then if two clients execute
the query at samt time, the temporary table will be overwritten

:?

Regards
"Mark Rae" wrote:
"ramata" <ra****@discussions.microsoft.com> wrote in message
news:17**********************************@microsof t.com...
How can be this problem solved in effecient way.


You don't mention what RDBMS you're using, but it sounds like you need a
crosstab query...
http://sqljunkies.com/WebLog/mattnun...08/07/173.aspx

Nov 19 '05 #3
"ramata" <ra****@discussions.microsoft.com> wrote in message
news:F4**********************************@microsof t.com...
1. Generating an SQL Select query by using the values in Group field will
not help as it will excede the limit of 8000 characters (for whole year
attendence)
No it won't...

SELECT REPLICATE('0', 8000) AS Text1, REPLICATE('0', 8000) As Text2
2. If I create an new table with date as colums, then if two clients
execute
the query at samt time, the temporary table will be overwritten


No it won't...
Nov 19 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

45
by: Joh | last post by:
hello, i'm trying to understand how i could build following consecutive sets from a root one using generator : l = would like to produce : , , , ,
11
by: George | last post by:
Was my question too challenging for everyone? I thought I would get a much quicker response, complete with witty and (sometimes) condescending remarks Here's my question again, in case you missed...
5
by: alainpoint | last post by:
Hi, I have what in my eyes seems a challenging problem. Thanks to Peter Otten, i got the following code to work. It is a sort of named tuple. from operator import itemgetter def...
12
by: vj | last post by:
Hi! I have a piece of code (shown below) involving complex numbers. The code is not running and giving error ("Invalid floating point operation" and "SQRT:Domain error"). I would be very...
6
by: c676228 | last post by:
Hi everyone, I searched on the internet and didn't get exactly what I want. Do you have any? -- Betty
3
by: Klaas Vantournhout | last post by:
Hi, I am using CLAPACK to do lots of matrix operations, but this is done on complex matrices. There I also need to work with normal complex operators, I use also the standard complex library. ...
5
by: =?Utf-8?B?YzY3NjIyOA==?= | last post by:
Hi all, I guess this probably a very silly question. I am not sure if this can be done in classical asp. A button has to be clicked if a selection in drop down list has been changed. If not, a...
10
by: =?Utf-8?B?YzY3NjIyOA==?= | last post by:
Hi all, Recently, a couple of our clients have asked if it is possible for them to pass data in xml format to our server program for processing it. Would you please give me some guide lines or...
1
by: perroe | last post by:
Hi I have a array of complex numbers that are stored in a simple double array. This is done since the array is part of an wrapper for an external C library, and the imaginary part of the first...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.