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
 SQL Server Development (2000)
 need a quick retival query

Author  Topic 

bkmurti
Starting Member

13 Posts

Posted - 2002-08-28 : 15:50:20
hai, i need a query i am stuck with it for the past 3 days. i am new to querying rdbms.
i am using the code in VB as front end backend being SQL server.

there are twotables independent of each other. one is "crt_subjects", which contains the details of courses (comp engineering,electrical enginnering etc) and subjects in each course

branch subject semester
1/4 comp engg operating system 1 semester

(1/4 comp engg means 1st year comp engg student,semester->1 semester means ist semester . therefore the above detail is of a subject OS found in 1st semester of first year comp engineering course)

Another Table is Stu_Attendance

branch rollno subject status date
1/4 computer engineering 0111A310 OS PRESENT 12/10/2001
1/4 computer engineering 0111A310 networks PRESENT 12/10/2001
1/4 computer engineering 0111A310 DBMS ABSENT 12/10/2001
1/4 computer engineering 0111A310 AI PRESENT 12/10/2001

like this each student has roughly 8 records perday for 25 days for all coursers which are 6(like comuter,electrical etc) in no and 4 years of each course with 2 semesters each year

i select the branch from combobox,semester from combobox and name of month in combobox

from crt_subjects i pick subjects names for the course selected, in selected semester and display in msFlecGrids fixed rows as title.

in following rows i need to display in the format below

Rollno student_Name subject1 subject2 subject3... subjectno N
0111A319 xxxxxxxxxxx 19(20) 27(29) .......................
total days present(total classes held) for example 19(20).

what i did was to store the subject name in an array and for each subjectname in array and for each student as i have to display all the details of the students. stu_attendance is 500000 records.

thanking u in advance
BK Murti

bkmurti
Starting Member

13 Posts

Posted - 2002-08-28 : 15:57:18
branch -----1/4 computer engineering
rollno -----0111A310
sunject----- OS(operating system)
status ----- present
date ----- 12/10/2001

just claryfying

Go to Top of Page
   

- Advertisement -