I have a piece of a query thats throwing me off.. I've solved the problem but I dont understand the solution. In the SQL I'm comparing dates. I use some pretty fancy SQL to get the startdate of a week and enddate of a week and startdate of a quarter and enddate of a quarter to display a calender in monthly or quarterly view separated by days, weeks, and months. There are tasks that occupy this calendar. So in the SQL I have WHERE t.startdate (+) <= p.periodend AND t.finishdate (+) >= p.periodstart
startdate and finishdate are in a date format with times.. IE. startdate in this one instance = 11/30/2004 8:30:00 AM finishdate in this one instance = 11/30/2004 11:00:00 AM periodend and periodstart are in date format but only have the date part. IE. in the above instance periodend = '11/30/2004' and periodstart = '11/30/2004' so why doesnt WHERE t.startdate (+) <= p.periodend AND t.finishdate (+) >= p.periodstart pick up that task? But WHERE t.startdate (+) <= p.periodend + 1 AND t.finishdate (+) >= p.periodstart does and without the joins WHERE trunc(t.startdate) <= p.periodend AND trunc(t.finishdate) >= p.periodstart works. Can someone explain?.. Thanks! -- Auxilium meum a Domino ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net http://www.cfhosting.net Message: http://www.houseoffusion.com/lists.cfm/link=i:4:184734 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54