Query Problem
Posted by:
ashish goel
Date: September 15, 2005 08:13AM
select OLO,decode(MCU,null,'not entered',MCU),
decode(TOTAL_CALLS,null,'not entered',TOTAL_CALLS),
decode(DURATION,null,'not entered',DURATION),
decode(AMOUNT,null,'not entered',AMOUNT)
from MCU_TABLE
where MONTH ='August'
AND PERSPECTIVE ='I'
AND CIRCLE_CODE ='BY'
AND SSA_CODE ='WTR'
AND POI_CODE ='MUMAX2'
AND SYSTEMDATE IN ( SELECT MAX(SYSTEMDATE)
FROM MCU_TABLE
WHERE MONTH ='August'
AND PERSPECTIVE ='I'
AND CIRCLE_CODE ='BY'
AND SSA_CODE ='WTR'
AND POI_CODE ='MUMAX2'
group by olo)
sir i want to get a unique value by using the max(systemdate) function,but i am not getting the same . i am finding the duplicate values.What to do,give m some sugession by seeing the query.