TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
shosho s
NA
137
99.6k
How to get missing records in a month?
Oct 23 2016 8:21 AM
I have a table in which i record the user time in and time out daily in a month.
So lets suppose today a user didnt time in /time out (and there could be many more days in a month.)
How can i get these records per month excluding the weekend which is Friday and Saturday?
Thank you in advance
Reply
Answers (
2
)
0
Nitin Sontakke
131
13.6k
14.9k
Oct 23 2016 12:27 PM
If you are using sql server, all you have to do is, have a table variable with rows with all the required dates in that table.
The select from that table and left outer join (or cross join) with attendance table, you get the all the dates and null next to dates where there is no data.
0
Midhun Tp
136
13.2k
1.5m
Oct 23 2016 8:41 AM
Hi,<br><br> Please find the relative solution in sql-<br> http://marlonribunal.com/finding-gaps-in-or-missing-dates-using-tsql/<br><br> Also have a look at below threads for something similar done with linq-<br> http://stackoverflow.com/questions/1468637/filling-in-missing-dates-using-a-linq-group-by-date-query<br> http://stackoverflow.com/questions/35062144/find-missing-date-in-listdatetime-and-insert-that-date-on-the-right-index
insert value from dropdown to table
Only 1 dropdown value in insert