Quantcast
Channel: Forum Getting started with SQL Server
Viewing all articles
Browse latest Browse all 7129

fetch current date records

$
0
0

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

  1. 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

  1. Query to get getdate() -1 records .

This query‘s has to be hard-coded to ran a job on daily basis.


Viewing all articles
Browse latest Browse all 7129

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>