Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL - Litle problem...
Message
De
13/04/2000 21:32:03
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
13/04/2000 21:19:13
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00359564
Message ID:
00359610
Vues:
8
>HI Cetin,
>
>Ignore my last post, the force clause works...:)
>
>A more litle help if you can, now i need to join another table, in my table clients i have the country code and need to go to table country get the country name.
>
>Thank's in Advance
>
>João Batista


Seeing your commented part "Force" might not be needed. Do not write "on .." like that. Try to follow just its belonging "join" so you can follow easier. Also utilize SQL alias assignments so code would be more readible :
Select * ;
    FROM jbfic!documentoscabcli a ;
    INNER JOIN jbfic!documentoslincli b ;
    on a.c_tipodoc = b.c_tipodoc;
    AND a.c_armazem = b.c_armazem;
    AND a.c_cod_ser = b.c_cod_ser;
    AND a.c_numdoc = b.c_numdoc;
    AND BETWEEN(a.c_tipodoc+a.c_armazem+a.c_cod_ser+a.c_numdoc, lcP, lcU) ;
    LEFT OUTER JOIN jbfic!documentos c ;
    ON a.c_codcli = d.c_codigo ;
    LEFT OUTER JOIN jbfic!clientes d ;
    ON a.c_tipodoc = c.c_codigo ;
    LEFT OUTER JOIN country e ;
    ON <b>d</b>.c_countryid = e.c_countryid ;
    ORDER BY a.c_tipodoc, a.c_armazem,;
    a.c_cod_ser, a.c_numdoc;
    into cursor fact
PS: Add FORCE if needed.
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform