SELECT (SUM_ABC) , ProjectName From(SELECT Sum(T1.[Debit])-SUM(T1.[Credit]) SUM_ABC ,(Select max(T1.Project)) ProjectNameFROM OJDT T0 INNER JOIN JDT1 T1 ON T0.TransId = T1.TransId inner join OCRD T2 on T2.[CardCode] = T1.[ShortName] INNER JOIN OCRG T3 ON T2.GroupCode = T3.GroupCode WHERE T1. [ShortName] like 'S%' and T0.RefDate <= '20200104' and T3.[GroupName]='Suppliers' and T1.[Project]='APSHHN' GROUP BY T1.[ShortName],T2.[CardName],T1.[Project] having Sum(T1.[Debit])-Sum(T1.[Credit])!= 0 and Sum(T1.[Debit])-Sum(T1.[Credit])<0) SUM_PQ
Hi Guys I am Ramasamy , SAP Business One Functional Consultant having Strong and Good Skills in SAP Business One Module; also i am a Freelancer. Give Online Training in SAP Business One By Remote . The Content which will be posted in this site will be very useful for SAP Business One Community people and if u have any doubts or need to help Freelancing Projects, Kindly mail me to Emailid : ramasamy.july12@gmail.com
Tuesday, 29 November 2016
Cumulative Balance By Project Wise Query
SELECT (SUM_ABC) , ProjectName From(SELECT Sum(T1.[Debit])-SUM(T1.[Credit]) SUM_ABC ,(Select max(T1.Project)) ProjectNameFROM OJDT T0 INNER JOIN JDT1 T1 ON T0.TransId = T1.TransId inner join OCRD T2 on T2.[CardCode] = T1.[ShortName] INNER JOIN OCRG T3 ON T2.GroupCode = T3.GroupCode WHERE T1. [ShortName] like 'S%' and T0.RefDate <= '20200104' and T3.[GroupName]='Suppliers' and T1.[Project]='APSHHN' GROUP BY T1.[ShortName],T2.[CardName],T1.[Project] having Sum(T1.[Debit])-Sum(T1.[Credit])!= 0 and Sum(T1.[Debit])-Sum(T1.[Credit])<0) SUM_PQ
Labels:
SQL Query
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment