Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Combining join conditions
Message
 
À
02/06/1999 13:01:20
Jorge Haro
Independent Consultant
Juarez, Mexique
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00225068
Message ID:
00225478
Vues:
13
>Thanks Frank, I usually prefer to do things programmtically, so this would be the way, I feel I have more control like this.

In case of creating the view joining more tahn one table programmatically, don't forget that the SQL syntax which View Designer is showing is wrong.

>SELECT Productos.prod_clase, Productos.prod_num, Dentradas.ent_numdoc,;
> Dentradas.ent_cantidad;
> FROM elsa!productos LEFT OUTER JOIN elsa!dentradas;
> LEFT OUTER JOIN elsa!productos ;
> ON Productos.prod_num = Dentradas.ent_numprod ;
> ON Productos.prod_clase = Dentradas.ent_clase

It has to be rearranged like:

CREATE SQL view myView AS ;
SELECT Productos.prod_clase, Productos.prod_num, Dentradas.ent_numdoc,;
Dentradas.ent_cantidad;
FROM elsa!productos ;
LEFT OUTER JOIN elsa!dentradas;
ON Productos.prod_clase = Dentradas.ent_clase ;
LEFT OUTER JOIN elsa!SomeOtherTable ;
ON Productos.prod_num = SomeOtherTable.ent_numprod ;

(assuming you put there the proper names for 2 different tables you want to join)

Nick
Nick Neklioudov
Universal Thread Consultant
3 times Microsoft MVP - Visual FoxPro

"I have not failed. I've just found 10,000 ways that don't work." - Thomas Edison
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform