I got E in GCSE-ICT.
I have two tables.
Table 1: Films & TV
Title, Format, Location
Table 2: Games
Title, Format, Location
I want a list of everything in any particular place.
Example: Shelf 5
I want one list of everything on Shelf 5.
How do I do that?
[Solved] LI5:...stuff from two tables???
[Solved] LI5:...stuff from two tables???
Last edited by Kirjava on Mon Oct 08, 2018 8:01 pm, edited 2 times in total.
OpenOffice 3.1 on Windows 7
Re: LI5: How to make one list with stuff from two tables???
Use the following Query:Kirjava wrote:I got E in GCSE-ICT.
I have two tables.
Table 1: Films & TV
Title, Format, Location
Table 2: Games
Title, Format, Location
I want a list of everything in any particular place.
Example: Shelf 5
I want one list of everything on Shelf 5.
How do I do that?
Code: Select all
Select A.* From
(
Select
"Files & TV"."Title",
"Files & TV"."Format",
"Files & TV"."Location"
From "Files & TV"
Where "Files & TV"."Location" = 'Shelf 5'
UNION
Select
"Games"."Title",
"Games"."Format",
"Games"."Location"
From "Games"
Where "Games"."Location" = 'Shelf 5'
) as A
Code: Select all
Select A.* From
(
Select
"Files & TV"."Title",
"Files & TV"."Format",
"Files & TV"."Location"
From "Files & TV"
Where "Files & TV"."Location" = :Enter_01_Location
UNION
Select
"Games"."Title",
"Games"."Format",
"Games"."Location"
From "Games"
Where "Games"."Location" = :Enter_01_Location
) as A
I hope this helps, please be sure to let me / us know.
Sliderule
Thanks to add [Solved] in your 1st post Subject (edit button top right) if this issue has been resolved.
Re: LI5: How to make one list with stuff from two tables???
Hello,
find attached an example, using a query with the SQL-CommandThen find in there a search form for the location using a one-row-filtertable
R
find attached an example, using a query with the SQL-Command
Code: Select all
UNION
R
- Attachments
-
- Two_Tables_List.odb
- (28.48 KiB) Downloaded 217 times
- MMove 1.0.6
- Extension for easy, exact positioning of shapes, pictures, controls, frames ...
- my current system
- Windows 10 AOO, LOLinux Mint AOO, LO
Re: LI5: How to make one list with stuff from two tables???
I don't know what UNION or SQL are.
OpenOffice 3.1 on Windows 7
Re: LI5: How to make one list with stuff from two tables???
Then you can't do it.Kirjava wrote:I don't know what UNION or SQL are.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Re: LI5: How to make one list with stuff from two tables???
Forget it I'll just filter the tables.
OpenOffice 3.1 on Windows 7
Re: LI5: How to make one list with stuff from two tables???
That is why, in my first post above, I said:Kirjava wrote:I don't know what UNION or SQL are.
Explanation:sliderule wrote:Sliderule wrote:If you need information about UNION, please do an Internet Search on SQL Tutorial UNION.
- Open your OpenOffice / LibreOffice Base file ( *.odb ).
- On the left, under Database, click on the Queries icon.
- Under Tasks, click on Create Query in SQL View...
- Copy and paste, either:
- the first Query I wrote above
- the second Query I wrote above
- Run the Query by either:
- Press the Run Query icon ( two sheets with a GREEN check mark ) on the toolbar
- Press F5 key
- From the Menu: Edit -> Run Query
Sliderule
Thanks to add [Solved] in your 1st post Subject (edit button top right) if this issue has been resolved.