I am working on some form of in-line (i.e. not UDF os SPROC) selection that would transform the returned date ranges to a form of "negative" date ranges. Here's the "source" set:

```
SELECT id, SDate, EDate
FROM table
ORDER BY SDate

```

Sample set:

```
1  01/05/2013  01/12/2013
2  01/13/2013  01/18/2013
3  02/05/2013  03/12/2013
4  07/08/2013  08/31/2013

```

Sought result (assume that we're interested in year 2013 only)

```
01/01/2013 01/04/2013
01/19/2013 02/04/2013
03/13/2013 07/07/2013
09/01/2013 12/31/2013

```

Am I on the right track trying to craft a recursive query using CTE? Anybody has SQL that can share?