Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How do I get all records from left join in this Select -
Message
From
05/04/2000 12:20:51
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00355646
Message ID:
00355747
Views:
25
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform