Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL - Litle problem...
Message
From
13/04/2000 21:32:03
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
13/04/2000 21:19:13
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00359564
Message ID:
00359610
Views:
7
>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform