>I think that you need to try:
>
>SELECT * FROM sales Sa RIGHT JOIN...
>
>or INNER JOIN, depending on what you are trying to accomplish.
Sorry, I forgot to mention what I want to get as result: The companies without corresponding records in the Sales table should get one record which the sales data is just empty. Because of the Where expression Sales.Price>0 this cannot be, because empty data is always null, so the sql cannot include this record in the cursor.
I fear I cannot do this in one SQL line, and I have to do some tricks, unless someone comes up with a good idea!
Thanks for help.
Christian Isberner
Software Consultant