dear all,

here in sql server, i found that an update statement takes much more time (30Min.) i want to optimize ..can someone help me ....the query is below.....

update SSS_RPT_ENTITY_COLL set --CONDITION CHANGED ON 08 MAR10
Final_elig_flag = case when (ISNULL(Asset_basel_elig_flag,'')= '' or Asset_basel_elig_flag='') then ''
when Asset_basel_elig_flag='Y' and Entity_basel_elig_flag='Y' and AssetEntity_Basel_Elig_Flag='Y' Then 'Y'
when Asset_basel_elig_flag='Y' and (ISNULL(Entity_basel_elig_flag,'Y')='Y' OR CASE WHEN Entity_basel_elig_flag='' THEN 'Y' END ='Y' ) and (ISNULL(AssetEntity_Basel_Elig_Flag,'Y')='Y' or CASE WHEN AssetEntity_Basel_Elig_Flag='' THEN 'Y' END='Y') Then 'Y'
when Asset_basel_elig_flag='Y' and (ISNULL(Entity_basel_elig_flag,'Y')='Y' OR CASE WHEN Entity_basel_elig_flag='' THEN 'Y' END ='Y' ) and AssetEntity_Basel_Elig_Flag='N' Then 'N'
when Asset_basel_elig_flag='Y' and Entity_basel_elig_flag='N' and (ISNULL(AssetEntity_Basel_Elig_Flag,'Y')='Y' or CASE WHEN AssetEntity_Basel_Elig_Flag='' THEN 'Y' END ='Y') Then 'N' end



Thanks