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 |
|
sow
Starting Member
1 Post |
Posted - 2011-11-29 : 08:01:43
|
| how i get previous dates count of employee present for each date / or how i get count of employee presented dates in the tablelike this 01/10/2011 to 31/10/2011----01/10/2011 if substitute present like 9316 datecolumn dispaly firstday02/10/2011 display 1 day present like 103/10/2011 (absent like -1) and display 2 days prest like count 204/10/2011 like 2 ----15/10/2011 count like 10 days ---21/10/2011 count is 12 days like end date with in the table we have find that count of present dayssow |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2011-11-29 : 08:06:55
|
something like thisselect date, (select count(*) from some_table x where x.date <= t.date)from some_table t KH[spoiler]Time is always against us[/spoiler] |
 |
|
|
|
|
|