Asagidaki View Onayli Açik Siparisleri getiren bir View örnegi arkadasim, bu view i ilgili database de çalistirirsan Netjob da hazirlayacagin uyari ekranini görebilirsin.
-------------------------------------------------------------------------------------------------------------------
DROP VIEW ONAYLISIP GO CREATE VIEW ONAYLISIP (SIPNO,CARI_KOD,CARI_ISIM,STOK_KODU,STOK_ADI,SIP_SATIR,TARIH,CIKMIK,TESMIK ) -- ONAYLANMAMIS SIPARIS HAREKETLERI AS SELECT FISNO,CARI_KOD,CARI_ISIM,SIPATRA.STOK_KODU,STOK_ADI,STRA_SIPKONT,STHAR_TARIH,SIPATRA.STHAR_GCMIK , ISNULL((SELECT SUM(STHAR.STHAR_GCMIK) FROM STHAR WHERE STHAR.STHAR_GCKOD = SIPATRA.STHAR_GCKOD AND STHAR.STHAR_SIPNUM = SIPATRA.FISNO AND STHAR.STRA_SIPKONT = SIPATRA.STRA_SIPKONT AND STHAR.STOK_KODU = SIPATRA.STOK_KODU AND STHAR.STHAR_HTUR <> 'E' AND STHAR.STHAR_HTUR <> 'A' AND STHAR.STHAR_HTUR <> 'D' AND STHAR.STHAR_SIPNUM IS NOT NULL AND STHAR.STHAR_GCKOD = 'C' AND (STHAR.STHAR_HTUR = 'J' OR STHAR.STHAR_HTUR = 'H')),0) AS TESLIM_MIKTARI
FROM SIPATRA INNER JOIN SIPAMAS ON (STHAR_FTIRSIP=SIPAMAS.FTIRSIP AND FISNO=FATIRS_NO AND STHAR_CARIKOD=SIPAMAS.CARI_KODU) INNER JOIN CASABIT ON STHAR_CARIKOD=CARI_KOD INNER JOIN STSABIT ON STSABIT.STOK_KODU=SIPATRA.STOK_KODU WHERE SIPATRA.STHAR_GCKOD='C' AND SIPATRA.STHAR_GCMIK > ISNULL((SELECT SUM(A.STHAR_GCMIK) FROM STHAR A WHERE A.STHAR_GCKOD = SIPATRA.STHAR_GCKOD AND A.STHAR_SIPNUM = SIPATRA.FISNO AND A.STRA_SIPKONT = SIPATRA.STRA_SIPKONT AND A.STOK_KODU = SIPATRA.STOK_KODU AND A.STHAR_HTUR <> 'E' AND A.STHAR_HTUR <> 'A' AND A.STHAR_HTUR <> 'D' AND A.STHAR_SIPNUM IS NOT NULL AND A.STHAR_GCKOD = 'C' AND (A.STHAR_HTUR = 'J' OR A.STHAR_HTUR = 'H')),0) AND SIPAMAS.TIPI='2'
----------------------------------------------------------------------------------------------
Iyi çalismalar...
-------------
Güngör Yılmaz
|