--Stok Kodundan

DECLARE @i int
SET @i=403233
select 'AC',ISLEMNO,BORC,ALACAK,BAACIKLA,CARINO,MUSADI  from ACARI WHERE ISLEMNO =@i UNION
select 'KS',ISLEMNO,BORC,ALACAK,BAACIKLA,HARNO,KASAADI from KASA WHERE ISLEMNO =@i UNION
select 'OD',IslemNo ,Borc ,Alacak,BAAcikla,NoId,CariKodu   from Odeme  WHERE IslemNo  =@i UNION
select TOP 1 'SH',IslemNo ,SonTutar ,SonTutarDov,IslemTuru,NoId,CariAdi from STOKHAR  WHERE IslemNo  =@i UNION
select 'SD',IslemNo ,Tutar ,DovizTut,IslemTuru,NoId,CariAdi from STOKHARDETBAG  WHERE IslemNo  =@i 






---çift db karşılaştırma
DECLARE @i int
SET @i=428565
select 'AC',ISLEMNO,BORC,ALACAK,BAACIKLA,CARINO,MUSADI  from ACARI WHERE ISLEMNO =@i UNION
select 'AC1',ISLEMNO,BORC,ALACAK,BAACIKLA,CARINO,MUSADI  from Ent_2021.dbo.ACARI WHERE ISLEMNO =@i 
select 'KS',ISLEMNO,BORC,ALACAK,BAACIKLA,HARNO,KASAADI from KASA WHERE ISLEMNO =@i UNION
select 'KS1',ISLEMNO,BORC,ALACAK,BAACIKLA,HARNO,KASAADI from Ent_2021.dbo.KASA WHERE ISLEMNO =@i 
select 'OD',IslemNo ,Borc ,Alacak,BAAcikla,NoId,CariKodu   from Odeme  WHERE IslemNo  =@i UNION
select 'OD1',IslemNo ,Borc ,Alacak,BAAcikla,NoId,CariKodu   from Ent_2021.dbo.Odeme  WHERE IslemNo  =@i 
select TOP 1 'SH',IslemNo ,SonTutar ,SonTutarDov,IslemTuru,NoId,CariAdi from STOKHAR  WHERE IslemNo  =@i UNION
select TOP 1 'SH1',IslemNo ,SonTutar ,SonTutarDov,IslemTuru,NoId,CariAdi from Ent_2021.dbo.STOKHAR  WHERE IslemNo  =@i 
select 'SD',IslemNo ,Tutar ,DovizTut,IslemTuru,NoId,CariAdi from STOKHARDETBAG  WHERE IslemNo  =@i UNION
select 'SD1',IslemNo ,Tutar ,DovizTut,IslemTuru,NoId,CariAdi from Ent_2021.dbo.STOKHARDETBAG  WHERE IslemNo  =@i 







