in oracle:
sql>select case when to_char(StartDate,'yyyy-mm-dd') < '2004-01-06' then '2004-01-06' else to_char(StartDate,'yyyy-mm-dd') end as startDate,
case when to_char(endDate,'yyyy-mm-dd') > '2004-01-22' then '2004-01-22' else to_char(endDate,'yyyy-mm-dd') end as endDate,price from test
where StartDate <= to_date('2004-01-22','yyyy-mm-dd') and endDate >=to_date('2004-01-06','yyyy-mm-dd')

result:
startDates endDates price
2004-01-06 2004-01-10 400.0000
2004-01-06 2004-01-16 500.0000
2004-01-06 2004-01-22 600.0000



In SQLServer:
sql>select case when startDate < '2004-01-06'
then '2004-01-06' else startDate end as startDate,
case when endDate > '2004-01-22'
then '2004-01-22' else endDate end as endDate,
price from test
where startDate <= '2004-01-22'
and endDate >= '2004-01-06'
Result:
startDates endDates price
2004-01-06 2004-01-10 400.0000
2004-01-11 2004-01-16 500.0000
2004-01-17 2004-01-22 600.0000

(3 row(s) affected)