Quantcast
Channel: Transact-SQL forum
Viewing all articles
Browse latest Browse all 23857

CURRENT WEEK SQL QUERY

$
0
0

I don't even want to ask as though i know becuase i don't. Im looking for a select statement that grabs current week information based on a date column.  I don't want to pre-set a date range because i want this query to "ROLL" form week to week. Beginning of the week being Sunday and End of the week being Saturday.

Below is as far as i could get.  But basicaly i would like to  WHERE DATENAME BETWEEN 'SUNDAY' AND 'SATURDAY'

Sorry, im a beginner and i know this is no where near close. Please Help

SELECT SALES_DATE, DATENAME(WEEKDAY, SALES_DATE)
FROM SALES_TBL
WHERE SALES_DATE BETWEEN


Viewing all articles
Browse latest Browse all 23857

Trending Articles



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