Making a join seems simple but I can't get it to work
Hi All,
I have 2 tables LUGallery and LUSubGallery, the tables are related by the GalleyID field
LUGallery
| Gallery ID | ClientID | GalleryName |
|---|---|---|
| 5 | 50 | Australia |
| 8 | 50 | Weddings |
| 12 | 33 | Portraits |
| 4 | 33 | Landscapes |
LUSubGallery
| SubGalleryID | GalleryID | GalleryName |
|---|---|---|
| 67 | 5 | NSW |
| 68 | 5 | QLD |
| 69 | 8 | Reception |
| 70 | 8 | Location |
| 87 | 8 | Ceromony |
| 97 | 4 | Rain Forest |
What I am try to do seems simple but I can't get it to work the way I want it.
I am trying to write a query to display Galleries from the LUGallery tbl that have a Sub Gallery attached to them (ie. It's GalleryID appears in the LUSubGallery tbl)
So the query for the above example would list Australia, Weddings & Landscapes
I have tried to write code both with inner joins and nested queries but just can't get it right,
Any help would be greatly appreciated.
Thanks in advance
Kris
