Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
kond.mohan
Posting Yak Master
213 Posts |
Posted - 2012-03-02 : 03:05:00
|
Hi, i am executing SELECT statementselect statement one of column(OUTSTANDING_AMT)have case statement like this-----------------------CASE WHEN dcmm.BILL_LODG_AMT > (DCMM.current_value * ((DCMM.ACTL_TOLERANCE_PCNT + 100)/100))+ DCMM.INTEREST_ADDTNL_AMT THEN 0 ELSE (case when (((DCMM.current_value * ((DCMM.ACTL_TOLERANCE_PCNT + 100)/100)) - DCMM.BILL_LODG_AMT - DCMM.DC_NOBILL_UTIL_AMT+ DCMM.INTEREST_ADDTNL_AMT) + dcmm.DC_REINST_AMT <0) THEN 0 ELSE ((DCMM.current_value * ((DCMM.ACTL_TOLERANCE_PCNT + 100)/100)) - DCMM.BILL_LODG_AMT - DCMM.DC_NOBILL_UTIL_AMT + DCMM.INTEREST_ADDTNL_AMT ) + dcmm.DC_REINST_AMT END)end 'Outstanding Amount',-----------------------my query have 20 columnsand remaining columns have not calculationsand i included where clause criteria complete outstainding amount coulun for getting outstanding Amount> 0report have 6000 recordshow to reducue the query execution timequery has taking to execute so much time |
|
|
|
|