This bit of code fails to format correctly in SQLinForm, mostly at the bottom.
Select
Cast( Sum( Cast (
Case
When CLMS.APA_CD in ( 1 , 2 )
Then Coalesce( Cast( CLMS.DC_AMT_AGG as DECIMAL(30,8)) ,0) -
Coalesce( Cast( CLMS.APA_RDCTN_AMT_AGG as DECIMAL(30,8)) ,0)
Else Coalesce( Cast( CLMS.DC_AMT_AGG as DECIMAL(30,8)) ,0)
End as DECIMAL(30,8)) ) as DECIMAL(30,8)) as DC_AMT_AGG_APA
From TABLE1 as CLMS
Left Join TABLE2 as DC_E
On CLMS.PERF_YEAR = DC_E.PERF_YEAR and CLMS.DCE_ID = DC_E.DCE_ID
Where CLMS.FIN_ELIG = 1
Group By CLMS.PERF_YEAR, CLMS.CLNDR_YR
Hi jpotelle,
which DB did you choose in the General option?
Formatting your SQL gives this result.
Could you please point me to the formatting problem
Thx
Guido
@admin TERADATA, below is formatting results
See the end of the CASE, the formatting trouble happens at FROM
Select Cast( Sum( Cast ( Case When CLMS.APA_CD in ( 1 , 2 ) Then Coalesce( Cast( CLMS.DC_AMT_AGG as DECIMAL(30,8)) ,0) - Coalesce( Cast( CLMS.APA_RDCTN_AMT_AGG as DECIMAL(30,8)) ,0) Else Coalesce( Cast( CLMS.DC_AMT_AGG as DECIMAL(30,8)) ,0) End as DECIMAL(30,8)) ) as DECIMAL(30,8)) as DC_AMT_AGG_APA From TABLE1 as CLMS Left Join TABLE2 as DC_E On CLMS.PERF_YEAR = DC_E.PERF_YEAR and CLMS.DCE_ID = DC_E.DCE_ID Where CLMS.FIN_ELIG = 1 Group By CLMS.PERF_YEAR, CLMS.CLNDR_YR
thx!
This is what I get using N++ 8.4.6 with SQLinForm 6.22.10.07
I imported your profile
Do you have some speciel white space chars before the "FROM" character?
Anyway I will think about this issue.
Regards
Ah, I forgot how frequently your plugin is updated. I updated NP++ to v8.4.6 (from v8.4.5), no joy. Then I updated SQLinForm to 6.22.10.04 (from 6.22.09) and this fixed the problem. Thanks!