Quote:Msg 8120, Level 16, State 1, Line 1 Column 'TBL_pur_inv.invno' is invalid in the select list because it is not contained in either an aggregate function or the GROUP BY clause.
select p.prtgst,p.prtynm,pr.invno,pr.invamt,PR.purinvdt,prd.pdcgst,sum(prd.totaltaxamt)As Rate,sum(prd.TaxableAmt)As Taxable_Amount from TBL_pur_inv as pr INNER JOIN tbl_party_ldg AS p ON pr.partyIDpur = p.partyID INNER JOIN TBL_pur_invdet AS prd ON pr.purinvid = prd.purinvid where purinvdt ='2018-01-04' GROUP BY prd.pdcgst
GROUP BY
GROUP BY p.prtgst,p.prtynm,pr.invno,pr.invamt,PR.purinvdt,prd.pdcgst
prd.pdcgst * 2
WHERE prd.pdcgst>0.00
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)