用户B3Z4M8196127(提问者)select 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\' 怎么改,可以年当筛选条件
Z4u3z1 回复 用户B3Z4M8196127(提问者)select 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\' and DATEPART(YEAR,sy.TRANSACTION_DATE,120)=DATEPART(YEAR,GETDATE())