select rc.BOOKKEEPING_DATE,YEAR(CONVERT(CHAR, rc.BOOKKEEPING_DATE, 111)) AS YEAR ,convert(varchar(7),rc.BOOKKEEPING_DATE,120) as n,month(rc.BOOKKEEPING_DATE) as 月 ,cy.COMPANY_NAME,c.CUSTOMER_FULL_NAME,(rc.TAX_FC+rc.AMT_UNTAX_FC) as z,rc.ACCOUNT_YEAR from RECEIVABLE_DOC as rc inner join COMPANY as cy on rc.Owner_Org_ROid = cy.COMPANY_ID inner join CUSTOMER as c on c.CUSTOMER_BUSINESS_ID=rc.SETTLEMENT_CUSTOMER_ID where (1=1 AND rc.ApproveStatus='Y') ORDER by convert(varchar(7),rc.BOOKKEEPING_DATE,120) asc |