For readability (ie. maintainability) purposes I prefer to place the Nvl() -- or decode -- inside the subquery. Just a preference
Code:SELECT t.Start_Dat, t.End_Dat FROM Tariff t WHERE t.Start_Dat >= (SELECT Nvl(max(t.start_dat), to_date('10/11/2003', 'dd/mm/yyyy')) FROM Tariff t WHERE t.Start_dat <= to_date('19/11/2003', 'dd/mm/yyyy'));




Reply With Quote