Jump to content
We've recently updated our Privacy Statement, available here ×

DE-12 in my preview


demusniko12

Recommended Posts

i used case when for 3 of my fields but when the field shoud've been null, they printed DE-12 from nowhere.

my query 

select
CAST(a.vdate as date) as end_day,
case when a.ccy = 'USD' and a.ctrccy = 'JPY' then sum(A.ccyamt*A.CCYRATE_8) else 0 end as usdjpy,
case when a.ccy = 'USD' and a.ctrccy = 'SGD' then sum(A.ccyamt*A.CCYRATE_8) else 0 end as usdsgd,
case when a.ccy = 'AUD' and a.ctrccy = 'USD' then sum(A.ccyamt*A.CCYRATE_8) else 0 end as audusd,
case when a.ccy = 'USD' and a.ctrccy = 'IDR' then sum(A.ccyamt*A.CCYRATE_8) else 0 end as usdidr,
COUNT(a.PRODCODE) as jumlah_transaksi


FROM FXDH A
LEFT JOIN CUST B ON A.CUST=B.CNO
LEFT JOIN BROK C ON A.BROK=C.BROKNO
LEFT JOIN TRAD D ON A.TRAD=D.TRAD
LEFT JOIN VW_SRHR E ON A.DEALDATE=E.TANGGAL AND A.CCY=E.CCY AND A.BR=E.BR

group by 
a.CCY,a.CTRCCY,CAST(a.vdate as date)
ORDER BY end_day

the previewed

screenshot_979.png.25603603f39c44598a3b8e0bbdde437b.png

Link to comment
Share on other sites

  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Posted Images

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...