alter VIEW SN_SIPARIS_1
as
SELECT        SIPARISHAR.SiparisTarihi, SIPARISHAR.IslemNo, SIPARISHAR.IslemTuru, SIPARISHAR.CariKodu, SIPARISHAR.CariAdi, SIPARISHAR.StokKodu, STOKKARTI.StokAdi, SIPARISHAR.FaturaMiktari, SIPARISHAR.Birim, 
                         SIPARISHAR.BirimFiyat, SIPARISHAR.Iskonto1, SIPARISHAR.Iskonto2, SIPARISHAR.Iskonto3, SIPARISHAR.Iskonto4, SIPARISHAR.Tutar, SIPARISHAR.Kdv, SIPARISHAR.SonTutar,   SIPARISHAR.Satici, 
                         SIPARISHAR.DovizKodu, STOKKARTI.UreticiFirmaKodu, STOKKARTI.GrupAdi, SIPARISHARDETBAG.SiparisDurumu, SIPARISHARDETBAG.Durumu
FROM            SIPARISHAR INNER JOIN
                         STOKKARTI ON SIPARISHAR.StokKodu = STOKKARTI.Kodu INNER JOIN
                         SIPARISHARDETBAG ON SIPARISHAR.IslemNo = SIPARISHARDETBAG.IslemNo
GROUP BY SIPARISHAR.SiparisTarihi, SIPARISHAR.IslemNo, SIPARISHAR.IslemTuru, SIPARISHAR.CariKodu, SIPARISHAR.CariAdi, SIPARISHAR.StokKodu, STOKKARTI.StokAdi, SIPARISHAR.FaturaMiktari, SIPARISHAR.Birim, 
                         SIPARISHAR.BirimFiyat, SIPARISHAR.Iskonto1, SIPARISHAR.Iskonto2, SIPARISHAR.Iskonto3, SIPARISHAR.Iskonto4, SIPARISHAR.Tutar, SIPARISHAR.Kdv, SIPARISHAR.SonTutar, SIPARISHAR.FisTuru, SIPARISHAR.Satici, 
                         SIPARISHAR.DovizKodu, STOKKARTI.UreticiFirmaKodu, STOKKARTI.GrupAdi, SIPARISHARDETBAG.SiparisDurumu, SIPARISHARDETBAG.Durumu
go
select * from SN_SIPARIS_1