1

Konu: SQL join ama nasil ?

asagida ornek data yaratabilecegimiz kodu bulunan 3 adet tablo var
bu 3 tabloyu birlestirdigimde 59S-037 kodlu kayit 2 defa geliyor sad
full,left,inner ile denedim ama sonuc ayni sizle bu 3 tabloyu birlestirme kodu nasil olmali ?


Visual Fox Pro
CreateCursor_crs_rut_r()

 
 
Procedure CreateCursor_crs_rut_r
LOCAL lcData, lcTemp
lcTemp = SYS(2015)+'.tmp'
TEXT TO m.lcData noshow
22.09.2008,"002","SATIŞ FATURASI-TOPTAN","59S-001"," BEYAZ KÖY MARKETHASAN CARDAK","04","59DU008","","BY","BUYUK YUMURTA",10,00,5,0000,50,0000,50,0000,"{F0E6A021-A563-44F7-8F28-3653F70B7FF4}"
22.09.2008,"002","SATIŞ FATURASI-TOPTAN","59S-002"," BEYAZ KÖY FAHRİ ERMANTAŞ","04","59DU008","","BY","BUYUK YUMURTA",2,00,5,0000,10,0000,10,0000,"{C289B7FF-6861-4BE3-A3D7-1453478BF986}"
22.09.2008,"002","SATIŞ FATURASI-TOPTAN","59S-003","UMUT MARKET MUZAFFER","04","59DU008","","BY","BUYUK YUMURTA",5,00,4,0000,20,0000,20,0000,"{E255B8FE-A8E7-4CA4-AE05-98D0329988A2}"
22.09.2008,"002","SATIŞ FATURASI-TOPTAN","59S-005","ŞEREFLİ UNLU MAMÜLLERİŞ","04","59DU008","","BY","BUYUK YUMURTA",4,00,5,0000,20,0000,20,0000,"{C23E236F-5CD8-49A6-B3DC-0D9A06922734}"
22.09.2008,"002","SATIŞ FATURASI-TOPTAN","59S-006","GÜNAYMARKET ŞABAN GASPİK","04","59DU008","","BY","BUYUK YUMURTA",5,00,4,0000,20,0000,20,0000,"{7D30FEB0-2FD2-40D9-91CE-C623AC62EF4D}"
22.09.2008,"002","SATIŞ FATURASI-TOPTAN","59S-009","DİMAR MARKET SERDAL GASPİK","04","59DU008","","BY","BUYUK YUMURTA",3,00,4,2000,12,6000,12,6000,"{A8EBAC33-353E-47DB-98AD-2B7E52221B72}"
22.09.2008,"002","SATIŞ FATURASI-TOPTAN","59S-012","GÜNAY BÜFE M.ALİDEMİRTAŞ","04","59DU008","","BY","BUYUK YUMURTA",4,00,0,0000,19,2000,19,2000,"{5156B652-868E-4149-946A-5F7790EA5D4C}"
22.09.2008,"002","SATIŞ FATURASI-TOPTAN","59S-014","EMİN BÜFE HAVVA SERBEST","04","59DU008","","BY","BUYUK YUMURTA",1,00,5,0000,5,0000,5,0000,"{59BD3989-EDB9-4B87-831E-972618C6A5A4}"
22.09.2008,"002","SATIŞ FATURASI-TOPTAN","59S-019","ALTAN BÜFE İRFAN SAATCİ","04","59DU008","","BY","BUYUK YUMURTA",3,00,5,0000,15,0000,15,0000,"{1486A48C-AE46-43D9-A946-F35EE89F9C3B}"
22.09.2008,"002","SATIŞ FATURASI-TOPTAN","59S-020","ELİF ŞAHİNİN ESKİ YERİ","04","59DU008","","BY","BUYUK YUMURTA",6,00,4,0000,24,0000,24,0000,"{10A95472-1295-4395-A367-403E7BA60D85}"
22.09.2008,"002","SATIŞ FATURASI-TOPTAN","59S-031","GÖKTUG BÜFE MURAT GÜLLÜ","04","59DU008","","BY","BUYUK YUMURTA",3,00,5,0000,15,0000,15,0000,"{5DFF00FE-81CD-4FC0-9285-3BD714473159}"
22.09.2008,"002","SATIŞ FATURASI-TOPTAN","59S-032","AYCAN MARKET AYCAN ARABACI","04","59DU008","","BY","BUYUK YUMURTA",10,00,4,2000,42,0000,42,0000,"{29AD11FD-06BD-4945-A9C7-094229C8568B}"
22.09.2008,"002","SATIŞ FATURASI-TOPTAN","59S-037","YENİCİFTLİKMARKET","04","59DU008","","BY","BUYUK YUMURTA",5,00,4,8000,24,0000,24,0000,"{305FC19C-F217-4E12-9C86-8C50E08A1835}"
22.09.2008,"002","SATIŞ FATURASI-TOPTAN","59S-037","YENİCİFTLİKMARKET","04","59DU008","","BY","BUYUK YUMURTA",12,00,5,1000,61,2000,61,2000,"{B41F0BB6-D0C1-4C00-B78C-3E872EA88B8E}"
22.09.2008,"002","SATIŞ FATURASI-TOPTAN","59S-038","CINAR BÖREK MUSTAFA CINAR","04","59DU008","","BY","BUYUK YUMURTA",20,00,4,8000,96,0000,96,0000,"{BF381EE3-0E33-4C66-93FD-4460AD78E116}"
22.09.2008,"002","SATIŞ FATURASI-TOPTAN","59S-045","BERKANT SAMET MARKET HÜRFETTİN NALBANT","04","59DU008","","BY","BUYUK YUMURTA",20,00,4,2000,84,0000,84,0000,"{9E909F05-D4FB-40D3-9BCF-AA9419D25C9E}"
22.09.2008,"002","SATIŞ FATURASI-TOPTAN","59S-046","CİGDEM MARKET ERDOGAN CETİN","04","59DU008","","BY","BUYUK YUMURTA",5,00,4,5000,22,5000,22,5000,"{6A6DCCFE-CD2E-4868-A1A7-2C691DD7169F}"
22.09.2008,"002","SATIŞ FATURASI-TOPTAN","59S-047","KAGIZMAN MARKETMÜSLÜM KAYA","04","59DU008","","BY","BUYUK YUMURTA",15,00,4,8000,72,0000,72,0000,"{BB893E7A-DA98-4848-98C9-BED0884E8962}"
22.09.2008,"002","SATIŞ FATURASI-TOPTAN","59S-061","PERVER MARKET FEVZİ PERVER","04","59DU008","","BY","BUYUK YUMURTA",20,00,4,5000,90,0000,90,0000,"{345F68F2-A6E9-405D-A744-26C1163944AC}"
22.09.2008,"002","SATIŞ FATURASI-TOPTAN","59S-067","KÖŞEM MARKET  YENİCİFTLİK","04","59DU008","","BY","BUYUK YUMURTA",5,00,4,8000,24,0000,24,0000,"{5CF4BCC6-1F56-4F7A-81CC-95F3A92FF3FE}"
22.09.2008,"002","SATIŞ FATURASI-TOPTAN","59S-071","ÖZCAN TUR.GID.İNŞ.TİC.LTD.ŞTİ.","04","59DU008","","BY","BUYUK YUMURTA",5,00,4,2000,21,0000,21,0000,"{94BDA8F7-983B-4577-856A-B750412C3A59}"
22.09.2008,"002","SATIŞ FATURASI-TOPTAN","59S-080","KASAP OGLU BÜFE KADİR KIZILAY","04","59DU008","","BY","BUYUK YUMURTA",5,00,4,8000,24,0000,24,0000,"{F3285828-E3D7-43D5-BC55-98CDE78423C8}"
22.09.2008,"002","SATIŞ FATURASI-TOPTAN","59S-090","ŞENOL MARKET MİNE ÖZER","04","59DU008","","BY","BUYUK YUMURTA",3,00,5,0000,15,0000,15,0000,"{1B17C5F7-C15F-4FC8-B5FB-8CFD6E215577}"
22.09.2008,"002","SATIŞ FATURASI-TOPTAN","59S-102","VAKIF KEBİR ASRİN KARDEŞLER UN VE UNLUMAMÜL.GID.İNŞ.TEKS TUR","04","59DU008","","BY","BUYUK YUMURTA",15,00,4,5000,67,5000,67,5000,"{961751BF-87C5-407B-863A-8A197A086EBF}"
22.09.2008,"002","SATIŞ FATURASI-TOPTAN","59S-103","BİZİM MARKET YUSUF ODABAŞI","04","59DU008","","BY","BUYUK YUMURTA",10,00,4,8000,48,0000,48,0000,"{48B8F608-FD03-472B-832B-1243C0205032}"
22.09.2008,"002","SATIŞ FATURASI-TOPTAN","59S-0007","AKKENT TATİL SİTESİ","04","59DU008","","BY","BUYUK YUMURTA",3,00,5,0000,15,0000,15,0000,"{0A23A28A-9B0A-4CCB-9E31-CE78121B8C20}"
22.09.2008,"002","SATIŞ FATURASI-TOPTAN","59S-0018","BARIŞ SAHİL","04","59DU008","","BY","BUYUK YUMURTA",6,00,5,0000,30,0000,30,0000,"{1B619D28-FF58-4349-A63C-E08AD43089D4}"
22.09.2008,"002","SATIŞ FATURASI-TOPTAN","59S-0026","CORLU BÜFE","04","59DU008","","BY","BUYUK YUMURTA",5,00,4,8000,24,0000,24,0000,"{A66128C6-1B87-4741-9C25-8A6ACF893A50}"
22.09.2008,"002","SATIŞ FATURASI-TOPTAN","59S-0035","UMUT2 YENİ CİFTLİK SAHİL PARKI","04","59DU008","","BY","BUYUK YUMURTA",5,00,4,8000,24,0000,24,0000,"{9CC92E76-8CEC-49D2-B705-D2C37C063A00}"
22.09.2008,"002","SATIŞ FATURASI-TOPTAN","59S-1002","KARDEŞLER MARKET HACI ANNENİN  ÖNÜNDE","04","59DU008","","BY","BUYUK YUMURTA",5,00,5,0000,25,0000,25,0000,"{F5367B5F-3446-4E26-94F2-FFF8117E1CB6}"
22.09.2008,"002","SATIŞ FATURASI-TOPTAN","59S-1003","KAAN GIDA KADİR ABİNİN DÜKKAN","04","59DU008","","BY","BUYUK YUMURTA",10,00,5,0000,50,0000,50,0000,"{868B2E40-86E7-4EDC-B3D9-F2040E9DB37B}"
22.09.2008,"002","SATIŞ FATURASI-TOPTAN","59S-1004","DONDURMACI YENİCİFTLİK","04","59DU008","","BY","BUYUK YUMURTA",10,00,5,0000,50,0000,50,0000,"{9670B4C2-BECB-4224-9A3E-355B47E5463B}"
22.09.2008,"002","SATIŞ FATURASI-TOPTAN","59S-1005","PAKIR","04","59DU008","","BY","BUYUK YUMURTA",0,00,0,0000,0,0000,0,0000,"{3D4E5AF2-ECEE-472D-81B5-E8343AF19A96}"
22.09.2008,"002","SATIŞ FATURASI-TOPTAN","59S-1007","SAHİL ALPET","04","59DU008","","BY","BUYUK YUMURTA",0,00,0,0000,0,0000,0,0000,"{412766D9-0EBF-4C35-B2FA-C8234DDA87DA}"
22.09.2008,"002","SATIŞ FATURASI-TOPTAN","59S-1011"," KARDEŞLER MARMARA EREGLİSİ","04","59DU008","","BY","BUYUK YUMURTA",20,00,4,5000,90,0000,90,0000,"{75C82BF6-A813-4CD1-93D6-87C4E20D2DD6}"
22.09.2008,"002","SATIŞ FATURASI-TOPTAN","59S-1014","USTA CAN MARKET GÜMÜŞ YAKA","04","59DU008","","BY","BUYUK YUMURTA",10,00,4,8000,48,0000,48,0000,"{A711CA06-7DAF-4EDF-B669-0277774525BD}"
22.09.2008,"002","SATIŞ FATURASI-TOPTAN","59S-1016","TRAKYA BİRLİK MARKET","04","59DU008","","BY","BUYUK YUMURTA",20,00,4,8000,96,0000,96,0000,"{D0F00182-0AA6-4DFE-99F0-D52E648721D6}"
22.09.2008,"002","SATIŞ FATURASI-TOPTAN","59S-1017","TUNA FIRIN","04","59DU008","","BY","BUYUK YUMURTA",10,00,4,5000,45,0000,45,0000,"{5FA8DB3F-1EF5-4F46-A0CC-FDB8827C65BC}"
22.09.2008,"002","SATIŞ FATURASI-TOPTAN","59S-1018","PINAR MARKET 1 YENİCİFLİK","04","59DU008","","BY","BUYUK YUMURTA",5,00,4,8000,24,0000,24,0000,"{2878482F-217A-4D47-94C8-F1B451761D32}"
22.09.2008,"002","SATIŞ FATURASI-TOPTAN","59S-1019","PINAR2  YENİCİFTLİK","04","59DU008","","BY","BUYUK YUMURTA",5,00,4,8000,24,0000,24,0000,"{30B1BEF1-62D0-4C48-B991-14477169EC8D}"
22.09.2008,"002","SATIŞ FATURASI-TOPTAN","59S-1020","İLVAN YENİCİFTLİK ARKASI","04","59DU008","","BY","BUYUK YUMURTA",3,00,4,5000,13,5000,13,5000,"{55B5351E-1377-406F-9A77-6048584BBEC0}"
22.09.2008,"002","SATIŞ FATURASI-TOPTAN","59S-1021","KÖŞEM LOKANTA GÜMÜŞYAKA","04","59DU008","","BY","BUYUK YUMURTA",2,00,5,0000,10,0000,10,0000,"{0907E620-1D6F-48F7-A64C-230A7F1C0D3A}"
22.09.2008,"002","SATIŞ FATURASI-TOPTAN","59S-1022","DORUKKAMP GÜMÜŞYAKA","04","59DU008","","BY","BUYUK YUMURTA",2,00,5,0000,10,0000,10,0000,"{69320A3C-DD5D-4925-8126-64A626073902}"
 
ENDTEXT
 
STRTOFILE(m.lcData,m.lcTemp)
 
create CURSOR crs_rut_r ;
( ;
  TARIH D(8,0)  NOT  NULL  ;
  ,FISKODU C(3,0)  NOT  NULL  ;
  ,ISLEMTIPI C(50,0)  NOT  NULL  ;
  ,CKODU C(16,0)  NULL  ;
  ,CADI C(60,0)  NOT  NULL  ;
  ,DEPOKODU C(3,0)  NOT  NULL  ;
  ,DEPOADI C(10,0)  NOT  NULL  ;
  ,PLSKODU C(16,0)  NOT  NULL  ;
  ,SKODU C(16,0)  NULL  ;
  ,SADI C(50,0)  NOT  NULL  ;
  ,MIKTAR N(10,2)  NULL  ;
  ,FIYAT N(10,4)  NULL  ;
  ,TUTAR N(15,4)  NULL  ;
  ,GTOPLAM N(15,4)  NULL  ;
  ,MYGUID C(38,0)  NULL  ;
  )
 
APPEND FROM (m.lcTemp) TYPE delimited
ERASE (m.lcTemp)
ENDPROC
 
*\\
 
CreateCursor_crs_cari_t()
 
 
Procedure CreateCursor_crs_cari_t
LOCAL lcData, lcTemp
lcTemp = SYS(2015)+'.tmp'
TEXT TO m.lcData noshow
"59S-001"," BEYAZ KÖY MARKETHASAN CARDAK",22.09.2008,"102","ALACAK DEKONTU",50,00
"59S-002"," BEYAZ KÖY FAHRİ ERMANTAŞ",22.09.2008,"102","ALACAK DEKONTU",10,00
"59S-003","UMUT MARKET MUZAFFER",22.09.2008,"102","ALACAK DEKONTU",20,00
"59S-005","ŞEREFLİ UNLU MAMÜLLERİŞ",22.09.2008,"102","ALACAK DEKONTU",20,00
"59S-006","GÜNAYMARKET ŞABAN GASPİK",22.09.2008,"102","ALACAK DEKONTU",20,00
"59S-009","DİMAR MARKET SERDAL GASPİK",22.09.2008,"102","ALACAK DEKONTU",12,60
"59S-012","GÜNAY BÜFE M.ALİDEMİRTAŞ",22.09.2008,"102","ALACAK DEKONTU",19,20
"59S-014","EMİN BÜFE HAVVA SERBEST",22.09.2008,"102","ALACAK DEKONTU",5,00
"59S-019","ALTAN BÜFE İRFAN SAATCİ",22.09.2008,"102","ALACAK DEKONTU",15,00
"59S-020","ELİF ŞAHİNİN ESKİ YERİ",22.09.2008,"102","ALACAK DEKONTU",24,00
"59S-031","GÖKTUG BÜFE MURAT GÜLLÜ",22.09.2008,"102","ALACAK DEKONTU",10,00
"59S-032","AYCAN MARKET AYCAN ARABACI",22.09.2008,"102","ALACAK DEKONTU",42,00
"59S-037","YENİCİFTLİKMARKET",22.09.2008,"102","ALACAK DEKONTU",0,00
"59S-037","YENİCİFTLİKMARKET",22.09.2008,"102","ALACAK DEKONTU",85,20
"59S-038","CINAR BÖREK MUSTAFA CINAR",22.09.2008,"102","ALACAK DEKONTU",50,00
"59S-045","BERKANT SAMET MARKET HÜRFETTİN NALBANT",22.09.2008,"102","ALACAK DEKONTU",84,00
"59S-046","CİGDEM MARKET ERDOGAN CETİN",22.09.2008,"102","ALACAK DEKONTU",0,00
"59S-047","KAGIZMAN MARKETMÜSLÜM KAYA",22.09.2008,"102","ALACAK DEKONTU",0,00
"59S-061","PERVER MARKET FEVZİ PERVER",22.09.2008,"102","ALACAK DEKONTU",90,00
"59S-067","KÖŞEM MARKET  YENİCİFTLİK",22.09.2008,"102","ALACAK DEKONTU",24,00
"59S-071","ÖZCAN TUR.GID.İNŞ.TİC.LTD.ŞTİ.",22.09.2008,"102","ALACAK DEKONTU",21,00
"59S-080","KASAP OGLU BÜFE KADİR KIZILAY",22.09.2008,"102","ALACAK DEKONTU",24,00
"59S-090","ŞENOL MARKET MİNE ÖZER",22.09.2008,"102","ALACAK DEKONTU",15,00
"59S-102","VAKIF KEBİR ASRİN KARDEŞLER UN VE UNLUMAMÜL.GID.İNŞ.TEKS TUR",22.09.2008,"102","ALACAK DEKONTU",67,50
"59S-103","BİZİM MARKET YUSUF ODABAŞI",22.09.2008,"102","ALACAK DEKONTU",68,00
"59MA-080","KAHYA MARKET AŞAGISI",22.09.2008,"102","ALACAK DEKONTU",0,00
"39L-001","ÖZKAN MARKET-MEHMET ÖZKAN",22.09.2008,"102","ALACAK DEKONTU",45,00
"39L-002","VAROL",22.09.2008,"102","ALACAK DEKONTU",39,50
"39L-003","ERGUVAN MARKET",22.09.2008,"102","ALACAK DEKONTU",0,00
"39L-004","TURGAY MARKET",22.09.2008,"102","ALACAK DEKONTU",80,00
"39L-008","UMAY UMAY BAKKALİYESİ MURAT UMUR",22.09.2008,"102","ALACAK DEKONTU",5,00
"39L-049","PALA",22.09.2008,"102","ALACAK DEKONTU",45,00
"39L-049","PALA",22.09.2008,"102","ALACAK DEKONTU",20,00
"39L-050","ÖZLEM MARKET HARUN CEBELLİ",22.09.2008,"102","ALACAK DEKONTU",21,00
"59S-0007","AKKENT TATİL SİTESİ",22.09.2008,"102","ALACAK DEKONTU",15,00
"59S-0018","BARIŞ SAHİL",22.09.2008,"102","ALACAK DEKONTU",30,00
"59S-0026","CORLU BÜFE",22.09.2008,"102","ALACAK DEKONTU",24,00
"59S-0035","UMUT2 YENİ CİFTLİK SAHİL PARKI",22.09.2008,"102","ALACAK DEKONTU",24,00
"59S-1002","KARDEŞLER MARKET HACI ANNENİN  ÖNÜNDE",22.09.2008,"102","ALACAK DEKONTU",25,00
"59S-1003","KAAN GIDA KADİR ABİNİN DÜKKAN",22.09.2008,"102","ALACAK DEKONTU",80,00
"59S-1004","DONDURMACI YENİCİFTLİK",22.09.2008,"102","ALACAK DEKONTU",55,00
"59S-1005","PAKIR",22.09.2008,"102","ALACAK DEKONTU",50,00
"59S-1007","SAHİL ALPET",22.09.2008,"102","ALACAK DEKONTU",70,00
"59S-1011"," KARDEŞLER MARMARA EREGLİSİ",22.09.2008,"102","ALACAK DEKONTU",90,00
"59S-1014","USTA CAN MARKET GÜMÜŞ YAKA",22.09.2008,"102","ALACAK DEKONTU",48,00
"59S-1016","TRAKYA BİRLİK MARKET",22.09.2008,"102","ALACAK DEKONTU",96,00
"59S-1017","TUNA FIRIN",22.09.2008,"102","ALACAK DEKONTU",45,00
"59S-1018","PINAR MARKET 1 YENİCİFLİK",22.09.2008,"102","ALACAK DEKONTU",24,00
"59S-1019","PINAR2  YENİCİFTLİK",22.09.2008,"102","ALACAK DEKONTU",24,00
"59S-1020","İLVAN YENİCİFTLİK ARKASI",22.09.2008,"102","ALACAK DEKONTU",13,50
"59S-1021","KÖŞEM LOKANTA GÜMÜŞYAKA",22.09.2008,"102","ALACAK DEKONTU",10,00
"59S-1022","DORUKKAMP GÜMÜŞYAKA",22.09.2008,"102","ALACAK DEKONTU",10,00
 
ENDTEXT
 
STRTOFILE(m.lcData,m.lcTemp)
 
create CURSOR crs_cari_t ;
( ;
  CKODU C(16,0)  NOT  NULL  ;
  ,CADI C(60,0)  NOT  NULL  ;
  ,TARIH D(8,0)  NOT  NULL  ;
  ,FISKODU C(3,0)  NOT  NULL  ;
  ,ISLEMTIPI C(50,0)  NOT  NULL  ;
  ,TUTAR N(15,2)  NOT  NULL  ;
  )
 
APPEND FROM (m.lcTemp) TYPE delimited
ERASE (m.lcTemp)
ENDPROC
 
*\\
 
CreateCursor_crs_cek_t()
 
 
Procedure CreateCursor_crs_cek_t
LOCAL lcData, lcTemp
lcTemp = SYS(2015)+'.tmp'
TEXT TO m.lcData noshow
 
ENDTEXT
 
STRTOFILE(m.lcData,m.lcTemp)
 
create CURSOR crs_cek_t ;
( ;
  TARIH D(8,0)  NOT  NULL  ;
  ,CKODU C(16,0)  NOT  NULL  ;
  ,CADI C(60,0)  NOT  NULL  ;
  ,FISKODU C(3,0)  NOT  NULL  ;
  ,ISLEMTIPI C(50,0)  NOT  NULL  ;
  ,TUTAR N(15,2)  NULL  ;
  )
 
APPEND FROM (m.lcTemp) TYPE delimited
ERASE (m.lcTemp)
endproc
http://www.soykansoft.com/images/twitter.jpghttp://www.soykansoft.com/images/wp.jpg

2

Re: SQL join ama nasil ?

crs_cek_t cursorunda data yok

bir de sql komut örneğini yollarsan biraz zihin cimlastiği yaparız ...

VFP9 SP2

3

Re: SQL join ama nasil ?

Kac defa gelmeliydi? 4 mu? Tablolarin birisi bos, 59S-037 digerlerinde ikiser kere geciyor.
Neyin neyle ilgisi oldugunu filan soylememissin. Yazdigin SQL nerede? Nasil bir sonuc bekliyordun?

22.09.2008,"002","SATIS FATURASI-TOPTAN","59S-037","YENICIFTLIKMARKET","04","59DU008","","BY","BUYUK YUMURTA",5,00,4,8000,24,0000,24,0000,"{305FC19C-F217-4E12-9C86-8C50E08A1835}"

22.09.2008,"002","SATIS FATURASI-TOPTAN","59S-037","YENICIFTLIKMARKET","04","59DU008","","BY","BUYUK YUMURTA",12,00,5,1000,61,2000,61,2000,"{B41F0BB6-D0C1-4C00-B78C-3E872EA88B8E}"

"59S-037","YENICIFTLIKMARKET",22.09.2008,"102","ALACAK DEKONTU",0,00
"59S-037","YENICIFTLIKMARKET",22.09.2008,"102","ALACAK DEKONTU",85,20


Not: SampleDatatotext'i duzenle.
set point to '.'

4

Re: SQL join ama nasil ?

Konuka evet Crs_Cek_t tablosunda data yok dogru ama sorguda olmasi gerekiyor.

2 defa gelmeliydi cunku Crs_Rut_R datasinda bakildiginda 2 defa var ve birlestirme sonucunda da dogal olarak 59S-037 2 defa gecmeli ama gecmiyor

asagida ki SQL sonucu 59S-037 4 defa geciyor ama Crs_Rut_R tablosuna bagli olarak 2 defa gecmesi gerek zaten 2 kayit var

Visual Fox Pro
SELECT Crs_rut_r.ckodu, Crs_rut_r.cadi,;

  NVL(Crs_rut_r.gtoplam,0.00) AS satistutar,;
  NVL(Crs_cari_t.tutar,0.00) AS chtahsilat,;
  NVL(Crs_cek_t.tutar,0.00) AS cektahsilat;
FROM ;
     crs_rut_r ;
    FULL JOIN crs_cari_t ;
   ON  Crs_rut_r.ckodu = Crs_cari_t.ckodu ;
    FULL JOIN crs_cek_t ;
   ON  Crs_rut_r.ckodu = Crs_cek_t.ckodu

NOT : SampleDatatotext'i duzenledim


yeni dataseti

Visual Fox Pro
CreateCursor_crs_rut_r()

 
 
Procedure CreateCursor_crs_rut_r
LOCAL lcData, lcTemp
lcTemp = SYS(2015)+'.tmp'
TEXT TO m.lcData noshow
22.09.2008,"002","SATIŞ FATURASI-TOPTAN","59S-001"," BEYAZ KÖY MARKETHASAN CARDAK","04","59DU008","","BY","BUYUK YUMURTA",10.00,5.0000,50.0000,50.0000,"{F0E6A021-A563-44F7-8F28-3653F70B7FF4}"
22.09.2008,"002","SATIŞ FATURASI-TOPTAN","59S-002"," BEYAZ KÖY FAHRİ ERMANTAŞ","04","59DU008","","BY","BUYUK YUMURTA",2.00,5.0000,10.0000,10.0000,"{C289B7FF-6861-4BE3-A3D7-1453478BF986}"
22.09.2008,"002","SATIŞ FATURASI-TOPTAN","59S-003","UMUT MARKET MUZAFFER","04","59DU008","","BY","BUYUK YUMURTA",5.00,4.0000,20.0000,20.0000,"{E255B8FE-A8E7-4CA4-AE05-98D0329988A2}"
22.09.2008,"002","SATIŞ FATURASI-TOPTAN","59S-005","ŞEREFLİ UNLU MAMÜLLERİŞ","04","59DU008","","BY","BUYUK YUMURTA",4.00,5.0000,20.0000,20.0000,"{C23E236F-5CD8-49A6-B3DC-0D9A06922734}"
22.09.2008,"002","SATIŞ FATURASI-TOPTAN","59S-006","GÜNAYMARKET ŞABAN GASPİK","04","59DU008","","BY","BUYUK YUMURTA",5.00,4.0000,20.0000,20.0000,"{7D30FEB0-2FD2-40D9-91CE-C623AC62EF4D}"
22.09.2008,"002","SATIŞ FATURASI-TOPTAN","59S-009","DİMAR MARKET SERDAL GASPİK","04","59DU008","","BY","BUYUK YUMURTA",3.00,4.2000,12.6000,12.6000,"{A8EBAC33-353E-47DB-98AD-2B7E52221B72}"
22.09.2008,"002","SATIŞ FATURASI-TOPTAN","59S-012","GÜNAY BÜFE M.ALİDEMİRTAŞ","04","59DU008","","BY","BUYUK YUMURTA",4.00,0.0000,19.2000,19.2000,"{5156B652-868E-4149-946A-5F7790EA5D4C}"
22.09.2008,"002","SATIŞ FATURASI-TOPTAN","59S-014","EMİN BÜFE HAVVA SERBEST","04","59DU008","","BY","BUYUK YUMURTA",1.00,5.0000,5.0000,5.0000,"{59BD3989-EDB9-4B87-831E-972618C6A5A4}"
22.09.2008,"002","SATIŞ FATURASI-TOPTAN","59S-019","ALTAN BÜFE İRFAN SAATCİ","04","59DU008","","BY","BUYUK YUMURTA",3.00,5.0000,15.0000,15.0000,"{1486A48C-AE46-43D9-A946-F35EE89F9C3B}"
22.09.2008,"002","SATIŞ FATURASI-TOPTAN","59S-020","ELİF ŞAHİNİN ESKİ YERİ","04","59DU008","","BY","BUYUK YUMURTA",6.00,4.0000,24.0000,24.0000,"{10A95472-1295-4395-A367-403E7BA60D85}"
22.09.2008,"002","SATIŞ FATURASI-TOPTAN","59S-031","GÖKTUG BÜFE MURAT GÜLLÜ","04","59DU008","","BY","BUYUK YUMURTA",3.00,5.0000,15.0000,15.0000,"{5DFF00FE-81CD-4FC0-9285-3BD714473159}"
22.09.2008,"002","SATIŞ FATURASI-TOPTAN","59S-032","AYCAN MARKET AYCAN ARABACI","04","59DU008","","BY","BUYUK YUMURTA",10.00,4.2000,42.0000,42.0000,"{29AD11FD-06BD-4945-A9C7-094229C8568B}"
22.09.2008,"002","SATIŞ FATURASI-TOPTAN","59S-037","YENİCİFTLİKMARKET","04","59DU008","","BY","BUYUK YUMURTA",5.00,4.8000,24.0000,24.0000,"{305FC19C-F217-4E12-9C86-8C50E08A1835}"
22.09.2008,"002","SATIŞ FATURASI-TOPTAN","59S-037","YENİCİFTLİKMARKET","04","59DU008","","BY","BUYUK YUMURTA",12.00,5.1000,61.2000,61.2000,"{B41F0BB6-D0C1-4C00-B78C-3E872EA88B8E}"
22.09.2008,"002","SATIŞ FATURASI-TOPTAN","59S-038","CINAR BÖREK MUSTAFA CINAR","04","59DU008","","BY","BUYUK YUMURTA",20.00,4.8000,96.0000,96.0000,"{BF381EE3-0E33-4C66-93FD-4460AD78E116}"
22.09.2008,"002","SATIŞ FATURASI-TOPTAN","59S-045","BERKANT SAMET MARKET HÜRFETTİN NALBANT","04","59DU008","","BY","BUYUK YUMURTA",20.00,4.2000,84.0000,84.0000,"{9E909F05-D4FB-40D3-9BCF-AA9419D25C9E}"
22.09.2008,"002","SATIŞ FATURASI-TOPTAN","59S-046","CİGDEM MARKET ERDOGAN CETİN","04","59DU008","","BY","BUYUK YUMURTA",5.00,4.5000,22.5000,22.5000,"{6A6DCCFE-CD2E-4868-A1A7-2C691DD7169F}"
22.09.2008,"002","SATIŞ FATURASI-TOPTAN","59S-047","KAGIZMAN MARKETMÜSLÜM KAYA","04","59DU008","","BY","BUYUK YUMURTA",15.00,4.8000,72.0000,72.0000,"{BB893E7A-DA98-4848-98C9-BED0884E8962}"
22.09.2008,"002","SATIŞ FATURASI-TOPTAN","59S-061","PERVER MARKET FEVZİ PERVER","04","59DU008","","BY","BUYUK YUMURTA",20.00,4.5000,90.0000,90.0000,"{345F68F2-A6E9-405D-A744-26C1163944AC}"
22.09.2008,"002","SATIŞ FATURASI-TOPTAN","59S-067","KÖŞEM MARKET  YENİCİFTLİK","04","59DU008","","BY","BUYUK YUMURTA",5.00,4.8000,24.0000,24.0000,"{5CF4BCC6-1F56-4F7A-81CC-95F3A92FF3FE}"
22.09.2008,"002","SATIŞ FATURASI-TOPTAN","59S-071","ÖZCAN TUR.GID.İNŞ.TİC.LTD.ŞTİ.","04","59DU008","","BY","BUYUK YUMURTA",5.00,4.2000,21.0000,21.0000,"{94BDA8F7-983B-4577-856A-B750412C3A59}"
22.09.2008,"002","SATIŞ FATURASI-TOPTAN","59S-080","KASAP OGLU BÜFE KADİR KIZILAY","04","59DU008","","BY","BUYUK YUMURTA",5.00,4.8000,24.0000,24.0000,"{F3285828-E3D7-43D5-BC55-98CDE78423C8}"
22.09.2008,"002","SATIŞ FATURASI-TOPTAN","59S-090","ŞENOL MARKET MİNE ÖZER","04","59DU008","","BY","BUYUK YUMURTA",3.00,5.0000,15.0000,15.0000,"{1B17C5F7-C15F-4FC8-B5FB-8CFD6E215577}"
22.09.2008,"002","SATIŞ FATURASI-TOPTAN","59S-102","VAKIF KEBİR ASRİN KARDEŞLER UN VE UNLUMAMÜL.GID.İNŞ.TEKS TUR","04","59DU008","","BY","BUYUK YUMURTA",15.00,4.5000,67.5000,67.5000,"{961751BF-87C5-407B-863A-8A197A086EBF}"
22.09.2008,"002","SATIŞ FATURASI-TOPTAN","59S-103","BİZİM MARKET YUSUF ODABAŞI","04","59DU008","","BY","BUYUK YUMURTA",10.00,4.8000,48.0000,48.0000,"{48B8F608-FD03-472B-832B-1243C0205032}"
22.09.2008,"002","SATIŞ FATURASI-TOPTAN","59S-0007","AKKENT TATİL SİTESİ","04","59DU008","","BY","BUYUK YUMURTA",3.00,5.0000,15.0000,15.0000,"{0A23A28A-9B0A-4CCB-9E31-CE78121B8C20}"
22.09.2008,"002","SATIŞ FATURASI-TOPTAN","59S-0018","BARIŞ SAHİL","04","59DU008","","BY","BUYUK YUMURTA",6.00,5.0000,30.0000,30.0000,"{1B619D28-FF58-4349-A63C-E08AD43089D4}"
22.09.2008,"002","SATIŞ FATURASI-TOPTAN","59S-0026","CORLU BÜFE","04","59DU008","","BY","BUYUK YUMURTA",5.00,4.8000,24.0000,24.0000,"{A66128C6-1B87-4741-9C25-8A6ACF893A50}"
22.09.2008,"002","SATIŞ FATURASI-TOPTAN","59S-0035","UMUT2 YENİ CİFTLİK SAHİL PARKI","04","59DU008","","BY","BUYUK YUMURTA",5.00,4.8000,24.0000,24.0000,"{9CC92E76-8CEC-49D2-B705-D2C37C063A00}"
22.09.2008,"002","SATIŞ FATURASI-TOPTAN","59S-1002","KARDEŞLER MARKET HACI ANNENİN  ÖNÜNDE","04","59DU008","","BY","BUYUK YUMURTA",5.00,5.0000,25.0000,25.0000,"{F5367B5F-3446-4E26-94F2-FFF8117E1CB6}"
22.09.2008,"002","SATIŞ FATURASI-TOPTAN","59S-1003","KAAN GIDA KADİR ABİNİN DÜKKAN","04","59DU008","","BY","BUYUK YUMURTA",10.00,5.0000,50.0000,50.0000,"{868B2E40-86E7-4EDC-B3D9-F2040E9DB37B}"
22.09.2008,"002","SATIŞ FATURASI-TOPTAN","59S-1004","DONDURMACI YENİCİFTLİK","04","59DU008","","BY","BUYUK YUMURTA",10.00,5.0000,50.0000,50.0000,"{9670B4C2-BECB-4224-9A3E-355B47E5463B}"
22.09.2008,"002","SATIŞ FATURASI-TOPTAN","59S-1005","PAKIR","04","59DU008","","BY","BUYUK YUMURTA",0.00,0.0000,0.0000,0.0000,"{3D4E5AF2-ECEE-472D-81B5-E8343AF19A96}"
22.09.2008,"002","SATIŞ FATURASI-TOPTAN","59S-1007","SAHİL ALPET","04","59DU008","","BY","BUYUK YUMURTA",0.00,0.0000,0.0000,0.0000,"{412766D9-0EBF-4C35-B2FA-C8234DDA87DA}"
22.09.2008,"002","SATIŞ FATURASI-TOPTAN","59S-1011"," KARDEŞLER MARMARA EREGLİSİ","04","59DU008","","BY","BUYUK YUMURTA",20.00,4.5000,90.0000,90.0000,"{75C82BF6-A813-4CD1-93D6-87C4E20D2DD6}"
22.09.2008,"002","SATIŞ FATURASI-TOPTAN","59S-1014","USTA CAN MARKET GÜMÜŞ YAKA","04","59DU008","","BY","BUYUK YUMURTA",10.00,4.8000,48.0000,48.0000,"{A711CA06-7DAF-4EDF-B669-0277774525BD}"
22.09.2008,"002","SATIŞ FATURASI-TOPTAN","59S-1016","TRAKYA BİRLİK MARKET","04","59DU008","","BY","BUYUK YUMURTA",20.00,4.8000,96.0000,96.0000,"{D0F00182-0AA6-4DFE-99F0-D52E648721D6}"
22.09.2008,"002","SATIŞ FATURASI-TOPTAN","59S-1017","TUNA FIRIN","04","59DU008","","BY","BUYUK YUMURTA",10.00,4.5000,45.0000,45.0000,"{5FA8DB3F-1EF5-4F46-A0CC-FDB8827C65BC}"
22.09.2008,"002","SATIŞ FATURASI-TOPTAN","59S-1018","PINAR MARKET 1 YENİCİFLİK","04","59DU008","","BY","BUYUK YUMURTA",5.00,4.8000,24.0000,24.0000,"{2878482F-217A-4D47-94C8-F1B451761D32}"
22.09.2008,"002","SATIŞ FATURASI-TOPTAN","59S-1019","PINAR2  YENİCİFTLİK","04","59DU008","","BY","BUYUK YUMURTA",5.00,4.8000,24.0000,24.0000,"{30B1BEF1-62D0-4C48-B991-14477169EC8D}"
22.09.2008,"002","SATIŞ FATURASI-TOPTAN","59S-1020","İLVAN YENİCİFTLİK ARKASI","04","59DU008","","BY","BUYUK YUMURTA",3.00,4.5000,13.5000,13.5000,"{55B5351E-1377-406F-9A77-6048584BBEC0}"
22.09.2008,"002","SATIŞ FATURASI-TOPTAN","59S-1021","KÖŞEM LOKANTA GÜMÜŞYAKA","04","59DU008","","BY","BUYUK YUMURTA",2.00,5.0000,10.0000,10.0000,"{0907E620-1D6F-48F7-A64C-230A7F1C0D3A}"
22.09.2008,"002","SATIŞ FATURASI-TOPTAN","59S-1022","DORUKKAMP GÜMÜŞYAKA","04","59DU008","","BY","BUYUK YUMURTA",2.00,5.0000,10.0000,10.0000,"{69320A3C-DD5D-4925-8126-64A626073902}"
 
ENDTEXT
 
STRTOFILE(m.lcData,m.lcTemp)
 
create CURSOR crs_rut_r ;
( ;
  TARIH D(8,0)  NOT  NULL  ;
  ,FISKODU C(3,0)  NOT  NULL  ;
  ,ISLEMTIPI C(50,0)  NOT  NULL  ;
  ,CKODU C(16,0)  NULL  ;
  ,CADI C(60,0)  NOT  NULL  ;
  ,DEPOKODU C(3,0)  NOT  NULL  ;
  ,DEPOADI C(10,0)  NOT  NULL  ;
  ,PLSKODU C(16,0)  NOT  NULL  ;
  ,SKODU C(16,0)  NULL  ;
  ,SADI C(50,0)  NOT  NULL  ;
  ,MIKTAR N(10,2)  NULL  ;
  ,FIYAT N(10,4)  NULL  ;
  ,TUTAR N(15,4)  NULL  ;
  ,GTOPLAM N(15,4)  NULL  ;
  ,MYGUID C(38,0)  NULL  ;
  )
 
APPEND FROM (m.lcTemp) TYPE delimited
ERASE (m.lcTemp)
ENDPROC
 
*\\
 
CreateCursor_crs_cari_t()
 
 
Procedure CreateCursor_crs_cari_t
LOCAL lcData, lcTemp
lcTemp = SYS(2015)+'.tmp'
TEXT TO m.lcData noshow
"59S-001"," BEYAZ KÖY MARKETHASAN CARDAK",22.09.2008,"102","ALACAK DEKONTU",50.00,"{F0E6A021-A563-44F7-8F28-3653F70B7FF4}"
"59S-002"," BEYAZ KÖY FAHRİ ERMANTAŞ",22.09.2008,"102","ALACAK DEKONTU",10.00,"{C289B7FF-6861-4BE3-A3D7-1453478BF986}"
"59S-003","UMUT MARKET MUZAFFER",22.09.2008,"102","ALACAK DEKONTU",20.00,"{E255B8FE-A8E7-4CA4-AE05-98D0329988A2}"
"59S-005","ŞEREFLİ UNLU MAMÜLLERİŞ",22.09.2008,"102","ALACAK DEKONTU",20.00,"{C23E236F-5CD8-49A6-B3DC-0D9A06922734}"
"59S-006","GÜNAYMARKET ŞABAN GASPİK",22.09.2008,"102","ALACAK DEKONTU",20.00,"{7D30FEB0-2FD2-40D9-91CE-C623AC62EF4D}"
"59S-009","DİMAR MARKET SERDAL GASPİK",22.09.2008,"102","ALACAK DEKONTU",12.60,"{A8EBAC33-353E-47DB-98AD-2B7E52221B72}"
"59S-012","GÜNAY BÜFE M.ALİDEMİRTAŞ",22.09.2008,"102","ALACAK DEKONTU",19.20,"{5156B652-868E-4149-946A-5F7790EA5D4C}"
"59S-014","EMİN BÜFE HAVVA SERBEST",22.09.2008,"102","ALACAK DEKONTU",5.00,"{59BD3989-EDB9-4B87-831E-972618C6A5A4}"
"59S-019","ALTAN BÜFE İRFAN SAATCİ",22.09.2008,"102","ALACAK DEKONTU",15.00,"{1486A48C-AE46-43D9-A946-F35EE89F9C3B}"
"59S-020","ELİF ŞAHİNİN ESKİ YERİ",22.09.2008,"102","ALACAK DEKONTU",24.00,"{10A95472-1295-4395-A367-403E7BA60D85}"
"59S-031","GÖKTUG BÜFE MURAT GÜLLÜ",22.09.2008,"102","ALACAK DEKONTU",10.00,"{5DFF00FE-81CD-4FC0-9285-3BD714473159}"
"59S-032","AYCAN MARKET AYCAN ARABACI",22.09.2008,"102","ALACAK DEKONTU",42.00,"{29AD11FD-06BD-4945-A9C7-094229C8568B}"
"59S-037","YENİCİFTLİKMARKET",22.09.2008,"102","ALACAK DEKONTU",0.00,"{B41F0BB6-D0C1-4C00-B78C-3E872EA88B8E}"
"59S-037","YENİCİFTLİKMARKET",22.09.2008,"102","ALACAK DEKONTU",85.20,"{305FC19C-F217-4E12-9C86-8C50E08A1835}"
"59S-038","CINAR BÖREK MUSTAFA CINAR",22.09.2008,"102","ALACAK DEKONTU",50.00,"{BF381EE3-0E33-4C66-93FD-4460AD78E116}"
"59S-045","BERKANT SAMET MARKET HÜRFETTİN NALBANT",22.09.2008,"102","ALACAK DEKONTU",84.00,"{9E909F05-D4FB-40D3-9BCF-AA9419D25C9E}"
"59S-046","CİGDEM MARKET ERDOGAN CETİN",22.09.2008,"102","ALACAK DEKONTU",0.00,"{6A6DCCFE-CD2E-4868-A1A7-2C691DD7169F}"
"59S-047","KAGIZMAN MARKETMÜSLÜM KAYA",22.09.2008,"102","ALACAK DEKONTU",0.00,"{BB893E7A-DA98-4848-98C9-BED0884E8962}"
"59S-061","PERVER MARKET FEVZİ PERVER",22.09.2008,"102","ALACAK DEKONTU",90.00,"{345F68F2-A6E9-405D-A744-26C1163944AC}"
"59S-067","KÖŞEM MARKET  YENİCİFTLİK",22.09.2008,"102","ALACAK DEKONTU",24.00,"{5CF4BCC6-1F56-4F7A-81CC-95F3A92FF3FE}"
"59S-071","ÖZCAN TUR.GID.İNŞ.TİC.LTD.ŞTİ.",22.09.2008,"102","ALACAK DEKONTU",21.00,"{94BDA8F7-983B-4577-856A-B750412C3A59}"
"59S-080","KASAP OGLU BÜFE KADİR KIZILAY",22.09.2008,"102","ALACAK DEKONTU",24.00,"{F3285828-E3D7-43D5-BC55-98CDE78423C8}"
"59S-090","ŞENOL MARKET MİNE ÖZER",22.09.2008,"102","ALACAK DEKONTU",15.00,"{1B17C5F7-C15F-4FC8-B5FB-8CFD6E215577}"
"59S-102","VAKIF KEBİR ASRİN KARDEŞLER UN VE UNLUMAMÜL.GID.İNŞ.TEKS TUR",22.09.2008,"102","ALACAK DEKONTU",67.50,"{961751BF-87C5-407B-863A-8A197A086EBF}"
"59S-103","BİZİM MARKET YUSUF ODABAŞI",22.09.2008,"102","ALACAK DEKONTU",68.00,"{48B8F608-FD03-472B-832B-1243C0205032}"
"59MA-080","KAHYA MARKET AŞAGISI",22.09.2008,"102","ALACAK DEKONTU",0.00,"{BF2321DD-C260-4341-A0B6-4C761F8ADEDA}"
"39L-001","ÖZKAN MARKET-MEHMET ÖZKAN",22.09.2008,"102","ALACAK DEKONTU",45.00,"{42932D71-F853-45F5-B650-47F7EC360D3E}"
"39L-002","VAROL",22.09.2008,"102","ALACAK DEKONTU",39.50,"{EAE897AE-1D21-41C6-879E-9AC68EE474DE}"
"39L-003","ERGUVAN MARKET",22.09.2008,"102","ALACAK DEKONTU",0.00,"{D7849B72-9D3B-4710-9BBB-121C0324F1E0}"
"39L-004","TURGAY MARKET",22.09.2008,"102","ALACAK DEKONTU",80.00,"{BCA879BD-ED96-457C-A0E7-58864011CD2E}"
"39L-008","UMAY UMAY BAKKALİYESİ MURAT UMUR",22.09.2008,"102","ALACAK DEKONTU",5.00,"{F2907448-536A-4792-91B8-33037946217E}"
"39L-049","PALA",22.09.2008,"102","ALACAK DEKONTU",45.00,"{DF005932-504D-4908-BB4C-F41ABAAF744B}"
"39L-049","PALA",22.09.2008,"102","ALACAK DEKONTU",20.00,"{156D099A-44CF-4613-B658-D89C2ECD0596}"
"39L-050","ÖZLEM MARKET HARUN CEBELLİ",22.09.2008,"102","ALACAK DEKONTU",21.00,"{96F3B690-A75B-4C90-90A5-2F4DBD300E69}"
"59S-0007","AKKENT TATİL SİTESİ",22.09.2008,"102","ALACAK DEKONTU",15.00,"{0A23A28A-9B0A-4CCB-9E31-CE78121B8C20}"
"59S-0018","BARIŞ SAHİL",22.09.2008,"102","ALACAK DEKONTU",30.00,"{1B619D28-FF58-4349-A63C-E08AD43089D4}"
"59S-0026","CORLU BÜFE",22.09.2008,"102","ALACAK DEKONTU",24.00,"{A66128C6-1B87-4741-9C25-8A6ACF893A50}"
"59S-0035","UMUT2 YENİ CİFTLİK SAHİL PARKI",22.09.2008,"102","ALACAK DEKONTU",24.00,"{9CC92E76-8CEC-49D2-B705-D2C37C063A00}"
"59S-1002","KARDEŞLER MARKET HACI ANNENİN  ÖNÜNDE",22.09.2008,"102","ALACAK DEKONTU",25.00,"{F5367B5F-3446-4E26-94F2-FFF8117E1CB6}"
"59S-1003","KAAN GIDA KADİR ABİNİN DÜKKAN",22.09.2008,"102","ALACAK DEKONTU",80.00,"{868B2E40-86E7-4EDC-B3D9-F2040E9DB37B}"
"59S-1004","DONDURMACI YENİCİFTLİK",22.09.2008,"102","ALACAK DEKONTU",55.00,"{9670B4C2-BECB-4224-9A3E-355B47E5463B}"
"59S-1005","PAKIR",22.09.2008,"102","ALACAK DEKONTU",50.00,"{3D4E5AF2-ECEE-472D-81B5-E8343AF19A96}"
"59S-1007","SAHİL ALPET",22.09.2008,"102","ALACAK DEKONTU",70.00,"{412766D9-0EBF-4C35-B2FA-C8234DDA87DA}"
"59S-1011"," KARDEŞLER MARMARA EREGLİSİ",22.09.2008,"102","ALACAK DEKONTU",90.00,"{75C82BF6-A813-4CD1-93D6-87C4E20D2DD6}"
"59S-1014","USTA CAN MARKET GÜMÜŞ YAKA",22.09.2008,"102","ALACAK DEKONTU",48.00,"{A711CA06-7DAF-4EDF-B669-0277774525BD}"
"59S-1016","TRAKYA BİRLİK MARKET",22.09.2008,"102","ALACAK DEKONTU",96.00,"{D0F00182-0AA6-4DFE-99F0-D52E648721D6}"
"59S-1017","TUNA FIRIN",22.09.2008,"102","ALACAK DEKONTU",45.00,"{5FA8DB3F-1EF5-4F46-A0CC-FDB8827C65BC}"
"59S-1018","PINAR MARKET 1 YENİCİFLİK",22.09.2008,"102","ALACAK DEKONTU",24.00,"{2878482F-217A-4D47-94C8-F1B451761D32}"
"59S-1019","PINAR2  YENİCİFTLİK",22.09.2008,"102","ALACAK DEKONTU",24.00,"{30B1BEF1-62D0-4C48-B991-14477169EC8D}"
"59S-1020","İLVAN YENİCİFTLİK ARKASI",22.09.2008,"102","ALACAK DEKONTU",13.50,"{55B5351E-1377-406F-9A77-6048584BBEC0}"
"59S-1021","KÖŞEM LOKANTA GÜMÜŞYAKA",22.09.2008,"102","ALACAK DEKONTU",10.00,"{0907E620-1D6F-48F7-A64C-230A7F1C0D3A}"
"59S-1022","DORUKKAMP GÜMÜŞYAKA",22.09.2008,"102","ALACAK DEKONTU",10.00,"{69320A3C-DD5D-4925-8126-64A626073902}"
 
ENDTEXT
 
STRTOFILE(m.lcData,m.lcTemp)
 
create CURSOR crs_cari_t ;
( ;
  CKODU C(16,0)  NOT  NULL  ;
  ,CADI C(60,0)  NOT  NULL  ;
  ,TARIH D(8,0)  NOT  NULL  ;
  ,FISKODU C(3,0)  NOT  NULL  ;
  ,ISLEMTIPI C(50,0)  NOT  NULL  ;
  ,TUTAR N(15,2)  NOT  NULL  ;
  ,FATROWGUID C(38,0)  NOT  NULL  ;
  )
 
APPEND FROM (m.lcTemp) TYPE delimited
ERASE (m.lcTemp)
ENDPROC
 
*\\
 
CreateCursor_crs_cek_t()
 
 
Procedure CreateCursor_crs_cek_t
LOCAL lcData, lcTemp
lcTemp = SYS(2015)+'.tmp'
TEXT TO m.lcData noshow
 
ENDTEXT
 
STRTOFILE(m.lcData,m.lcTemp)
 
create CURSOR crs_cek_t ;
( ;
  TARIH D(8,0)  NOT  NULL  ;
  ,CKODU C(16,0)  NOT  NULL  ;
  ,CADI C(60,0)  NOT  NULL  ;
  ,FISKODU C(3,0)  NOT  NULL  ;
  ,ISLEMTIPI C(50,0)  NOT  NULL  ;
  ,TUTAR N(15,2)  NULL  ;
  ,MYGUID C(38,0)  NULL  ;
  )
 
APPEND FROM (m.lcTemp) TYPE delimited
ERASE (m.lcTemp)
ENDPROC
http://www.soykansoft.com/images/twitter.jpghttp://www.soykansoft.com/images/wp.jpg

5

Re: SQL join ama nasil ?

cozdum smile 2 tabloada ki FatRowGuid alani 1.ci tabloda var dolayisi ile asil eslesme onunla olmasi gerekiyordu atlamisim ...

Visual Fox Pro
SELECT Crs_rut_r.ckodu, Crs_rut_r.cadi,;

  NVL(Crs_rut_r.gtoplam,0.00) AS satistutar,;
  NVL(Crs_cari_t.tutar,0.00) AS chtahsilat,;
  NVL(Crs_cek_t.tutar,0.00) AS cektahsilat;
FROM ;
     crs_rut_r ;
    FULL JOIN crs_cari_t ;
   ON  Crs_rut_r.ckodu = Crs_cari_t.ckodu ;
    FULL JOIN crs_cek_t ;
   ON  Crs_rut_r.ckodu = Crs_cek_t.ckodu;
   WHERE Crs_rut_r.MYGUID = Crs_cari_t.FATROWGUID
http://www.soykansoft.com/images/twitter.jpghttp://www.soykansoft.com/images/wp.jpg