Tuesday, March 25, 2014

sql query to bind data from grid and print total count and amount total when date changes

As per your sample output what you need is this



SELECT SLHD.VOUCH_DATE,SUM(SLTXN.CALC_NET_AMT) AS AMT,SUM(SLTXN.TOT_QTY) AS QTY
FROM SL_HEAD20132014 AS SLHD,ACCOUNTS AS ACT,SL_TXN20132014 AS SLTXN
WHERE SLHD.ACT_CODE=ACT.ACT_CODE AND SLTXN.VOUCH_CODE=SLHD.VOUCH_CODE
GROUP BY SLHD.VOUCH_DATE
WITH CUBE
ORDER BY SLHD.VOUCH_DATE





Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://ift.tt/19nLNVq http://ift.tt/1iEAj0c


No comments:

Post a Comment