用户B3Z4M8196127(提问者)没看明白
select DATEPART(YEAR,sy.TRANSACTION_DATE) as year,convert(varchar(4),sy.TRANSACTION_DATE,120) as nn,convert(varchar(7),sy.TRANSACTION_DATE,120) as n ,cr.CUSTOMER_FULL_NAME as customer,cy.COMPANY_NAME as company,(sy.AMOUNT_UNINCLUDE_TAX_BC+sy.TAX_BC)as syheji from SALES_DELIVERY as sy inner join
COMPANY as cy on sy.INVOICE_COMPANY_ID=cy.COMPANY_ID inner join CUSTOMER as cr on sy.CUSTOMER_ID=cr.CUSTOMER_BUSINESS_ID where 1=1 and sy.ApproveStatus=\'Y\'