Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How do I get all records from left join in this Select -
Message
De
05/04/2000 12:20:51
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00355646
Message ID:
00355747
Vues:
27
CREATE SQL VIEW CALLBACK AS ;
>SELECT ALL Servcalls.*, Customers.company;
> FROM appdata!servcalls LEFT JOIN appdata!customers ;
> ON Servcalls.prim_key = Customers.prim_key ;
> GROUP BY Servcalls.prim_key;
> ORDER BY Servcalls.callbacktime


Hi James,

Does your table 'Servcalls' have lots of records but only two distinct customer id's ?

If so, remove the GROUP BY clause from the SELECT and run it. Ideally, you should be running a GROUP BY expression only if there is an aggregate field in your SELECT statement. There does'nt seem to be one.

I know Philip Pastor mentioned that, but his SELECT statement had an INNER JOIN which would exclude all record id's (if there are others) which do not have a corresponding record in Servcalls; Servcalls being the child table.

Hope it helps.
Sanjay Kapoor

Relatively speaking is a conversation with Einstein
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform