Bu kodu nerden buldun bilmiyorum ama ,zaten aldıgın hatda ne hata yaptıgın da yazıyor .
Böyle değil ;
SELECT CL.DEFINITION_,NULL,NULL,CS.NEWSERINO,CS.DUEDATE AS 'VADESI',CS.AMOUNT AS 'TUTARI',(CASE WHEN CS.TRCURR=20 THEN '€' WHEN CS.TRCURR=1 THEN '$' ELSE 'TL' END) FROM LG_011_01_CSCARD CS,
LG_011_01_CSTRANS CST,LG_011_CLCARD CL WHERE CS.DOC=3 AND CST.CSREF = CS.LOGICALREF AND CST.CARDREF = CL.LOGICALREF
UNION ALLSELECT B.NAME_,(SELECT COUNT(T.CREDITREF) FROM LG_011_BNCREPAYTR T,LG_011_BNCREDITCARD B WHERE T.TRANSTYPE=0 AND T.CREDITREF=B.LOGICALREF),T.LINENR,B.CODE,T.DUEDATE,(T.TOTAL+T.INTTOTAL+T.BSMVTOTAL+T.KKDFTOTAL),(CASE WHEN B.TRCURR=20 THEN '€' WHEN B.TRCURR=1 THEN '$' ELSE 'TL' END) FROM LG_011_BNCREPAYTR T,LG_011_BNCREDITCARD B WHERE T.CREDITREF=B.LOGICALREF
Böyle çalıştırcaksın ;
SELECT CL.DEFINITION_,NULL,NULL,CS.NEWSERINO,CS.DUEDATE AS 'VADESI',CS.AMOUNT AS 'TUTARI',(CASE WHEN CS.TRCURR=20 THEN '€' WHEN CS.TRCURR=1 THEN '$' ELSE 'TL' END) FROM LG_011_01_CSCARD CS,
LG_011_01_CSTRANS CST,LG_011_CLCARD CL WHERE CS.DOC=3 AND CST.CSREF = CS.LOGICALREF AND CST.CARDREF = CL.LOGICALREF
UNION ALL
SELECT B.NAME_,(SELECT COUNT(T.CREDITREF) FROM LG_011_BNCREPAYTR T,LG_011_BNCREDITCARD B WHERE T.TRANSTYPE=0 AND T.CREDITREF=B.LOGICALREF),T.LINENR,B.CODE,T.DUEDATE,(T.TOTAL+T.INTTOTAL+T.BSMVTOTAL+T.KKDFTOTAL),(CASE WHEN B.TRCURR=20 THEN '€' WHEN B.TRCURR=1 THEN '$' ELSE 'TL' END) FROM LG_011_BNCREPAYTR T,LG_011_BNCREDITCARD B WHERE T.CREDITREF=B.LOGICALREF