>When I run this SELECT command it only returns two records.
>The left table Servcalls has many records and I want to return all of them in a view. The right table Customers is the parent in a one to many relation with servcalls.
>
>Thanks in advance for your help!
>
>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
Take a look at the JOIN condtion. You are using the Servcalls primary to join with the Customer primary key. There should be a Customer foreign key in the Servcalls table. This query just picks the 2 records with the same primary key values and displays them.
Larry Miller
MCSD
LWMiller3@verizon.netAccumulate learning by study, understand what you learn by questioning. -- Mingjiao