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.
| Author |
Topic |
|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2004-12-13 : 08:24:31
|
| shabir writes "i have two table1)master table and (ii)attendance tablestudents_code is common among twoand i want to retrieve all the students and there status(i mean presnt or absent) with respect to datesmaster_table[st_code,name,address] attendance table[st_code,status,date]i want display like St_code 1/1/2004 1/2/2004 1/2/2004....1 present present absent2 present present absent3 present present absent 45..." |
|
|
Seventhnight
Master Smack Fu Yak Hacker
2878 Posts |
Posted - 2004-12-13 : 08:38:36
|
I want a million dollars! This should be done in presentation layer!The query should be a simple join on [st_Code]Select A.name, B.st_Code, B.Status, B.Date From master_Table A Inner Join attendance_Table B On A.st_code = B.st_CodeWhere B.date between @dateRangeBegin and @dateRangeEndCorey |
 |
|
|
|
|
|