1.金額數字轉字元型別

weixin_41778291發表於2020-09-29

 1.金額數字轉字元型別

  to_char(ar.advance_amt,'9999999999999999999990.99') advanceAmt,

 其中9帶佔位符

 2.時間Date轉字元型別

select ar.id receiptRecordNo,
       to_char(ar.advance_amt,'9999999999999999999990.99') advanceAmt,
       
       decode(t.advance_type,
              '0',
              '轉賬預收',
              '1',
              '支票預收',
              '2',
              'POS預收',
              T.ADVANCE_TYPE) advanceType,
    
       t.advance_account_flag as advanceAccountFlag,
       to_char(t.advance_date, 'yyyy-MM-dd') as advanceDate,
       to_char(t.advance_audit_date, 'yyyy-MM-dd') as advanceAuditDate,
       
      
  FROM FRPS_ADVANCE_RECEIVE t, frps_advance_receive_record ar
 WHERE t.is_valid = '1'
   and t.receipt_no = ar.receipt_no
 
 order by ar.updated_date desc;

 

 

相關文章