| reg_date | dcotor_name | patient_name | reg_no | Kin_name |
| 1/1/2014 | rahul | manmohan | 12534 | sonia |
| 3/1/2014 | narendra | abc | 54896 | lalu |
| 4/1/2014 | ||||
| 10/1/2014 |
I have two datetimepickers in c# windows form application, when I select date as 01/01/2014 to 31/01/2014 it shows me the date on which doctor was present and other details in datgridview.I have inner join 3-4 tables to get above data. My is how to get missing dates i.e 2/1/2014,5/1/2014 and so on in which doctor was not present.
Sunny ShaikhPosted Jun 17, 2014, 5:34 AM
alan kumarPosted Jun 17, 2014, 3:23 AM
Keyur PatelPosted Jun 17, 2014, 3:10 AM
You can use common table expression and pass your date range. Please refer following links to find missing dates in sql.
http://www.codeproject.com/Tips/328085/Find-Missed-Date-Ranges-using-SQL-Server
https://www.simple-talk.com/sql/t-sql-programming/find-missing-date-ranges-in-sql/
http://stackoverflow.com/questions/20677472/sql-find-missing-date-ranges