Ask Your Question

Query help please

asked 2019-06-01 23:10:58 +0200

jodybingo gravatar image

Hi all, I have a table for...

  • Company (contains company name, address, phone etc.) Primary key is "Corp ID"
  • Company Contact (because a single company can have several contacts) containing a person's info and a Contact ID and a Corp ID (update & delete cascade).
  • Reservation Info (date, time, etc) and a Contact ID linked to the upper table
  • Theme Package (a food package for children) with a link to the Reservation ID
  • Adult Package (a food package for adults) with a link to the Reservation ID

Now, we take reservations for groups that do not take either food package (a la carte) so at this point there aren't any entries on the Theme package table or Adult Package Table. When I create a query to display all the above info my query returns zero results. If I remove the last two tables from my query I get the names, phone #s, reservation date and times. How can I get my query to show results if my last 2 tables do not have any contents?

Thank You

edit retag flag offensive close merge delete


Hello, Unfortunately it is not clear how you expect help when information is vague at best. You have not specified what specific version of LO is being used, OS, database being used and neither the problematic SQL nor a sample Base file. Expected output would be of help. The answer most likely lies in table joins.

Ratslinger gravatar imageRatslinger ( 2019-06-02 03:41:58 +0200 )edit

1 Answer

Sort by » oldest newest most voted

answered 2019-06-03 13:04:26 +0200

In the query editor, edit the link drawn between tables

  • Reservation and Theme package
  • Reservation and Adult package

Change field "Type" to Left or Right Join and read the explanations.

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower


Asked: 2019-06-01 23:10:58 +0200

Seen: 49 times

Last updated: Jun 03 '19