MySQL Forums
Forum List  »  Microsoft SQL Server

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.

Options: ReplyQuote


Subject
Written By
Posted
August 25, 2005 11:57PM
August 28, 2005 07:05AM
Query Problem
September 15, 2005 08:13AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.