SQL 2008: Exclude row if 2 columns in one row has these values -


good day, example purposes: these given data query.

t0.date   t0.customer    t0.total   t1.date,  t1.total 2.1.2017  blabla         2,400.00   3.8.2017  2,400.00 1.2.2017  bloblo         5,000.00   3.1.2017  5,000.00 1.1.2017  bleble         3,000.00   2.5.2017  3,000.00 12.5.2016 blabla         1,000.00   1.25.2017 1,000.00 

how can possibly idea of removing rows t0.date=january(1) , on same row t1.date=march(3) query. thinking of using case when inside clause dont know how begin condition. then, if t1.date=february(2), doesn't matter if t0.date=1 or last years month(12.1.2016)..

update: expected output:

t0.date   t0.customer    t0.total   t1.date, t1.total 2.1.2017  blabla         2,400.00   3.8.2017 2,400.00 1.1.2017  bleble         3,000.00   2.5.2017 3,000.00 12.5.2016 blabla         1,000.00   1.25.2017 1,000.00 

is want?

where t0.date <> '2017-01-01' or t1.date <> '2017-03-03' 

or, if looking entire month:

where not ( (t0.date >= '2017-01-01' , t0.date < '2017-02-01') ,             (t1.date >= '2017-03-01' , t1.date < '2017-04-01')           ) 

Comments

Popular posts from this blog

commonjs - How to write a typescript definition file for a node module that exports a function? -

openid - Okta: Failed to get authorization code through API call -

ios - Change Storyboard View using Seague -