Arkadaşlar merhaba,
Şu şekilde bir query varmı acaba
Müşteri No-Müşteri Ünvanı-total bakiye-vadesi geçen tutar- geçikmiş günü
xxxxxxxxx xxxxxxxxxxxxx 100 80 10
xxxxxxxxx xxxxxxxxxxxxxx 100 20 15
Yardımlarınız için şimdiden teşekkürler
Bende yeni olmama rağmen şöyle bir sorgu hazırladım.
KREDİ KARTLARI
SELECT LG_777_BANKACC.DEFINITION_, LG_777_04_CLFICHE.CREDIT, LG_777_04_CLFICHE.DATE_, LG_777_04_CLFLINE.DOCODE, LG_777_CLCARD.DEFINITION_, LG_777_CLCARD.CODE, LG_777_04_CLFICHE.BRANCH
FROM UNITY.dbo.LG_777_04_CLFICHE LG_777_04_CLFICHE, UNITY.dbo.LG_777_04_CLFLINE LG_777_04_CLFLINE, UNITY.dbo.LG_777_BANKACC LG_777_BANKACC, UNITY.dbo.LG_777_CLCARD LG_777_CLCARD
WHERE LG_777_BANKACC.LOGICALREF = LG_777_04_CLFICHE.BANKACCREF AND LG_777_CLCARD.LOGICALREF = LG_777_04_CLFICHE.CLCARDREF AND LG_777_04_CLFLINE.SOURCEFREF = LG_777_04_CLFICHE.LOGICALREF AND ((LG_777_04_CLFICHE.BRANCH=465) AND (LG_777_04_CLFLINE.TRCODE=70))
ORDER BY LG_777_BANKACC.DEFINITION_
Bu sorgu kredi karlarının bankasını turarını belge numarasını vs. veriyor.
SATIŞ VE TAHSİLAT RAPORU
SELECT CASE WHEN LG_777_04_CLFLINE.TRCODE=1 THEN 'Nakit' WHEN LG_777_04_CLFLINE.TRCODE=38 THEN 'Toptan Satış Faturası' WHEN LG_777_04_CLFLINE.TRCODE=33 THEN 'İade Faturası' WHEN LG_777_04_CLFLINE.TRCODE=34 THEN 'Hizmet Faturası' WHEN LG_777_04_CLFLINE.TRCODE=20 THEN 'Havale-Eft' WHEN LG_777_04_CLFLINE.TRCODE=70 THEN 'Kredi Kartı' WHEN LG_777_04_CLFLINE.TRCODE=61 THEN 'Çek' WHEN LG_777_04_CLFLINE.TRCODE=62 THEN 'Senet' ELSE ' ' END AS TÜR, LG_777_04_CLFLINE.DATE_ AS 'İŞLEM TARİHİ', LG_777_CLCARD.CODE AS 'CARİ KOD', LG_777_CLCARD.CYPHCODE AS 'YK', LG_777_CLCARD.DEFINITION_ AS 'ÜNVAN', (LG_777_04_CLFLINE.DOCODE) AS 'BELGENO', LG_777_04_CLFLINE.AMOUNT AS 'TUTAR' , LG_777_04_CLFLINE.BRANCH AS 'İŞYERİ' FROM UNITY.dbo.LG_777_04_CLFLINE LG_777_04_CLFLINE, UNITY.dbo.LG_777_CLCARD LG_777_CLCARD WHERE LG_777_04_CLFLINE.CLIENTREF = LG_777_CLCARD.LOGICALREF AND ((LG_777_04_CLFLINE.TRCODE In (38,1,70,61,62,20,33,34)) AND (LG_777_CLCARD.CODE Like '0%')) AND LG_777_04_CLFLINE.BRANCH=465 AND (LG_777_04_CLFLINE.DATE_>{ts'2012-01-01 00:00:00'}) AND LG_777_04_CLFLINE.CANCELLED=0 ORDER BY LG_777_04_CLFLINE.DATE_
Buda tarih tarih alınan nakit kredi kartı vs. veriyor
Saygılarımla (Tiğer 1,88 kullanıyorum)