[SQL] Intersection of two date interval

2007-01-26 Thread Suha Onay

Hi,

How can i find the number of days in the intersection of 2 date interval?
For example:
1st  interval: (10.01.2007, 20.01.2007)
2nd interval: (13.01.2007, 21.01.2007)
The intersection dates are: 13,14,15,16,17,18,19, 20
The result is: 8

How can i find the result, 8 in an sql query without using CASE statements?

Table columns are id PK, date1 date, date2 date.

Thanks for all your help.


Suha


[SQL] Invitation to connect on LinkedIn

2009-01-26 Thread Suha Onay
LinkedIn


Suha Onay requested to add you as a connection on LinkedIn:
--

Marcin,

I'd like to add you to my professional network on LinkedIn.

- Suha

View invitation from Suha Onay
http://www.linkedin.com/e/XCcEdFwZmSzO1q19PFca3OmGtDdI_FirNbrhE9/blk/962530550_2/cBYMdjkMcPkOdzALqnpPbOYWrSlI/svi/
 

--
DID YOU KNOW you can use your LinkedIn profile as your website? Select a vanity 
URL and then promote this address on your business cards, email signatures, 
website, etc
http://www.linkedin.com/e/ewp/inv-21/


 
--
(c) 2009, LinkedIn Corporation