Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Outer joins in Oracle and VFP
Message
De
26/02/1998 04:59:56
 
 
À
25/02/1998 18:56:46
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00081056
Message ID:
00081295
Vues:
26
Hello Mo, Here is a sample of SQL statement from Oracle for which I have no idea about how it can be even implemented in VFP: SELECT gesch.gesch,bls.rechwk_zud, bls.ztgja_gj, bls.kj, bls.BUCH_ART,; bls.zttga_whg , BLS.KZ_SCHAETZ,BLS.BUCH_ART,; SUM(iif(kz_beitr_1='J', betr, 0)) as beitrag_1,; SUM(iif(kz_erg_1='J', betr, 0)) as ergebnis_1,; SUM(iif(kz_beitr_2='J', betr, 0)) as beitrag_2,; SUM(iif(kz_erg_2='J', betr, 0)) as ergebnis_2; FROM gesch, bls02 bls; WHERE bls.rtgts_gesch(+) = gesch.gesch; AND bls.buch_art(+) NOT IN ('I','K','Y'); AND DECODE(floor(bls.kj(+)/1997),1, 1,floor(bls.ztgja_gj(+)/1997 ))=1; GROUP BY gesch.gesch, bls.rechwk_zud, bls.ztgja_gj, bls.kj,; bls.BUCH_ART, bls.zttga_whg , BLS.KZ_SCHAETZ,BLS.BUCH_ART DECODE(floor...) stands for the following condition bls.kj(+) >= 1997 or bls.ztgja_gj(+) > 1997 Obviously, it doesn't match to : bls.kj>= 1997 or bls.ztgja_gj > 1997... Or it does? The author told me that he doing it because (+) are forbidden with OR... I do understand how to convert the first two rows of Where clause (outer joins on subsequent queries), but stumped on the last one... Please, if you have any thoughts or just ideas about conversion, let me know.... >I checked it out. >it is like >select ...... where name NOT IN( select name >from ....... >where name = 9999) >************************* >EXAMPLE from Oracle book: >SELECT a.name, lodging >from worker a >where a.name not in >(select name >from workershell >where skill = 'smithy') >order by a.name; >the same as >select a.name, lodging >from worker a, workershell b >where a.name = b.name(+) >and b.name is NULL >and b.skill(+) = 'smithy' order by a.name;
* Human is a question asked by birth and answered by death. Machine is another kind of question with another kind of answer
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform