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 2005 Forums
 Transact-SQL (2005)
 Help in sql query with explanation as i m noob..

Author  Topic 

vijayrawatsan
Starting Member

18 Posts

Posted - 2009-10-15 : 11:57:01

Hello All,

I am trying to write a query to print Attendance(Present or absent) of a student using its student id.

Below is the scenario:
str=string

Table Att
Student_id(str),Course_id(str),Subject_id(str),Date(datetime),Attendance(str)

Tabel Students
Student_id(str),Name(str),Class_roll(str)

Tabel Users
User_id(str),Name(str)

User_id=Student_id is to be used while joining...

OUTPUT FORMAT:::
TA=total attendance(number of presents)
Assume "-" = " "

Date N is the Nth date...

Class_roll | Name | Date1 | Date2 | Date3 |.....| Date N | TA
01/08-----Vijay---Present--Absent--Present-----Present--3
02/08-----Karan---Present--Present--Present----Present--4


Well main problem that I am facing is getting the dates from database into GridView's column...

If some one can write me the whole query or help me in doing so then plz do..
I will appreciate his/her response.

Thank You.

vijayrawatsan
Starting Member

18 Posts

Posted - 2009-10-16 : 07:57:06
SomeOne plzz help
Go to Top of Page
   

- Advertisement -