Tables contains follow data
productID | Type | Color | date |
1 | Bike | black | 2013-04-17 19:31:40.097 |
2 | Car | Red | 2013-05-17 19:31:40.603 |
1 | Car | Brown | 2013-04-17 19:31:40.673 |
2 | Cycle | Black | 2014-06-03 19:31:40.673 |
1 | Car | Brown | 2013-04-17 19:31:40.673 |
2 | bike | Black | 2014-06-03 19:31:40.673 |
This is how daily the details are added in the table
- I want query to fetch all the currentdate records
For example : I want all the records added on 2014-06-03 19:31:40.673
- Query to get getdate() -1 records .
This query‘s has to be hard-coded to ran a job on daily basis.