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

update date range table based on date

$
0
0

Hi,

I need some help writing some sql... bit difficult to explain but here goes

I have two tables, see below for example. I need to update the DateRange table and set the flag to 1, if the date from the Date table falls with in the range. Date are all intergers

DateRange Table

columns(MonthStart,MonthEnd,Flag)

201301,20130131,(1 - set to 1 because the date from the date table falls within this date range )

Date Table

columns(Date)

20130101

20131201

etc etc


Viewing all articles
Browse latest Browse all 23857

Trending Articles



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