sql - Using select query for between where clause -


i have find out date falls between 2 other dates selected different table in microsoft sql server

i.e. want like

     select a.*  ( select member.key,             case when effective_date between (select month_start , month_end             sales_month             month=2 , year=2013) bucket_1            1 else 0 member )           a.bucket_1 != 0 

i have duplicate case statement different months. ideas / help?

thanks

shankar.

use variables hold information.

declare @startdate datetime,         @enddate datetime select @startdate = month_start        , @enddate = month_end sales_month [month] = 2 , [year] = 2013  select * member effective_date between @startdate , @enddate 

Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -