Siparis devri esnasinda asagidaki hatayi almaktayim. Neden olabilir acaba ???
INSERT INTO FAW2013..SIPATRA ( STOK_KODU,FISNO,STHAR_GCMIK,STHAR_GCMIK2,CEVRIM,STHAR_GCKOD,STHAR_TARIH,STHAR_NF,STHAR_BF,STHAR_IAF,STHAR_KDV,DEPO_KODU,STHAR_ACIKLAMA,STHAR_SATISK,STHAR_MALFISK,STHAR_FTIRSIP,STHAR_SATISK2,LISTE_FIAT,STHAR_HTUR,STHAR_DOVTIP,PROMASYON_KODU,STHAR_DOVFIAT,STHAR_ODEGUN,STRA_SATISK3,STRA_SATISK4,STRA_SATISK5,STRA_SATISK6,STHAR_BGTIP,STHAR_KOD1,STHAR_KOD2,STHAR_SIPNUM,STHAR_CARIKOD,STHAR_SIP_TURU,PLASIYER_KODU,EKALAN_NEDEN,EKALAN,EKALAN1,REDMIK,REDNEDEN,SIRA,STRA_SIPKONT,AMBAR_KABULNO,FIRMA_DOVTIP,FIRMA_DOVTUT,FIRMA_DOVMAL,UPDATE_KODU,IRSALIYE_NO,IRSALIYE_TARIH,KOSULKODU,ECZA_FAT_TIP,STHAR_TESTAR,OLCUBR,VADE_TARIHI,LISTE_NO,BAGLANTI_NO,SUBE_KODU,MUH_KODU,S_YEDEK1,S_YEDEK2,F_YEDEK3,F_YEDEK4,F_YEDEK5,C_YEDEK6,B_YEDEK7,I_YEDEK8,L_YEDEK9,D_YEDEK10,PROJE_KODU,FIYATTARIHI,KOSULTARIHI,SATISK1TIP,SATISK2TIP,SATISK3TIP,SATISK4TIP,SATISK5TIP,SATISK6TIP,EXPORTTYPE,EXPORTMIK,ONAYTIPI,ONAYNUM,KKMALF,STRA_IRSKONT,YAPKOD,MAMYAPKOD,OTVFIYAT ) SELECT SIPATRA.STOK_KODU,SIPATRA.FISNO,SIPATRA.STHAR_GCMIK,SIPATRA.STHAR_GCMIK2,SIPATRA.CEVRIM,SIPATRA.STHAR_GCKOD,SIPATRA.STHAR_TARIH,SIPATRA.STHAR_NF,SIPATRA.STHAR_BF,SIPATRA.STHAR_IAF,SIPATRA.STHAR_KDV,SIPATRA.DEPO_KODU,SIPATRA.STHAR_ACIKLAMA,SIPATRA.STHAR_SATISK,SIPATRA.STHAR_MALFISK,SIPATRA.STHAR_FTIRSIP,SIPATRA.STHAR_SATISK2,SIPATRA.LISTE_FIAT,SIPATRA.STHAR_HTUR,SIPATRA.STHAR_DOVTIP,SIPATRA.PROMASYON_KODU,SIPATRA.STHAR_DOVFIAT,SIPATRA.STHAR_ODEGUN,SIPATRA.STRA_SATISK3,SIPATRA.STRA_SATISK4,SIPATRA.STRA_SATISK5,SIPATRA.STRA_SATISK6,SIPATRA.STHAR_BGTIP,SIPATRA.STHAR_KOD1,SIPATRA.STHAR_KOD2,SIPATRA.STHAR_SIPNUM,SIPATRA.STHAR_CARIKOD,SIPATRA.STHAR_SIP_TURU,SIPATRA.PLASIYER_KODU,SIPATRA.EKALAN_NEDEN,SIPATRA.EKALAN,SIPATRA.EKALAN1,SIPATRA.REDMIK,SIPATRA.REDNEDEN,SIPATRA.SIRA,SIPATRA.STRA_SIPKONT,SIPATRA.AMBAR_KABULNO,SIPATRA.FIRMA_DOVTIP,(CASE WHEN SIPATRA.STHAR_TARIH<='12/31/2012' THEN -1 ELSE FIRMA_DOVTUT END),SIPATRA.FIRMA_DOVMAL,SIPATRA.UPDATE_KODU,SIPATRA.IRSALIYE_NO,SIPATRA.IRSALIYE_TARIH,SIPATRA.KOSULKODU,SIPATRA.ECZA_FAT_TIP,SIPATRA.STHAR_TESTAR,SIPATRA.OLCUBR,SIPATRA.VADE_TARIHI,SIPATRA.LISTE_NO,SIPATRA.INCKEYNO,SIPATRA.SUBE_KODU,SIPATRA.MUH_KODU,SIPATRA.S_YEDEK1,SIPATRA.S_YEDEK2,SIPATRA.F_YEDEK3,SIPATRA.F_YEDEK4,SIPATRA.F_YEDEK5,SIPATRA.C_YEDEK6,SIPATRA.B_YEDEK7,SIPATRA.I_YEDEK8,SIPATRA.L_YEDEK9,SIPATRA.D_YEDEK10,SIPATRA.PROJE_KODU,SIPATRA.FIYATTARIHI,SIPATRA.KOSULTARIHI,SIPATRA.SATISK1TIP,SIPATRA.SATISK2TIP,SIPATRA.SATISK3TIP,SIPATRA.SATISK4TIP,SIPATRA.SATISK5TIP,SIPATRA.SATISK6TIP,SIPATRA.EXPORTTYPE,SIPATRA.EXPORTMIK,SIPATRA.ONAYTIPI,SIPATRA.ONAYNUM,SIPATRA.KKMALF,SIPATRA.STRA_IRSKONT,SIPATRA.YAPKOD,SIPATRA.MAMYAPKOD,SIPATRA.OTVFIYAT FROM SIPATRA, FAW2013..SIPAMAS YENIMAS WHERE SIPATRA.SUBE_KODU = 0 AND SIPATRA.STHAR_HTUR = 'H' AND YENIMAS.TIPI <> 1 AND YENIMAS.FTIRSIP = SIPATRA.STHAR_FTIRSIP AND YENIMAS.FTIRSIP = '6' AND YENIMAS.FATIRS_NO = SIPATRA.FISNO AND YENIMAS.CARI_KODU = SIPATRA.STHAR_ACIKLAMA AND ( ((SIPATRA.STHAR_GCMIK - SIPATRA.FIRMA_DOVTUT + SIPATRA.F_YEDEK3) > 0) OR (SIPATRA.L_YEDEK9 = -1) OR (SIPATRA.STHAR_TARIH > '12/31/2012')) AND NOT EXISTS ( SELECT STHAR_FTIRSIP,FISNO,STHAR_ACIKLAMA FROM FAW2013..SIPATRA B WHERE B.SUBE_KODU = 0 AND B.STHAR_HTUR = 'H' AND YENIMAS.FTIRSIP = B.STHAR_FTIRSIP AND YENIMAS.FTIRSIP = '6' AND YENIMAS.FATIRS_NO = B.FISNO AND YENIMAS.CARI_KODU = B.STHAR_ACIKLAMA AND SIPATRA.STHAR_FTIRSIP = B.STHAR_FTIRSIP AND SIPATRA.FISNO = B.FISNO AND SIPATRA.STHAR_ACIKLAMA = B.STHAR_ACIKLAMA )
Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=, <, <= , >, >= or when the subquery is used as an expression.(NetsisMS-21000,512) The statement has been terminated.(NetsisMS-01000,3621)
|