SELECT
cast(((SUM(CASHTOT.DEBIT)-SUM(CASHTOT.CREDIT)))as int) AS NAKITTAHSILAT,CASHTOT.CARDREF AS AMBAR
FROM
LG_114_01_CSHTOTS CASHTOT WITH(NOLOCK, INDEX = I114_01_CSHTOTS_I2)
WHERE
(CASHTOT.CARDREF = 80) AND (CASHTOT.TOTTYPE = 2) AND (CASHTOT.DAY_ > -1)
GROUP BY CASHTOT.CARDREF
No comments:
Post a Comment