[Solved] How to JOIN 3 Tables?

Creating tables and queries
Post Reply
Victor P
Posts: 7
Joined: Wed Oct 27, 2021 8:36 am

[Solved] How to JOIN 3 Tables?

Post by Victor P »

Select * From (Table1 JOIN Table2 ON Table1.ID = Table2.ID) JOIN Table3 ON Table2.ID2 = Table3.ID

Why it is wrong? How to JOIN with JOIN 3 tables?
Last edited by Victor P on Thu Oct 28, 2021 8:19 am, edited 1 time in total.
OpenOffice 4.1.11 Windows 10
User avatar
MrProgrammer
Moderator
Posts: 5349
Joined: Fri Jun 04, 2010 7:57 pm
Location: Wisconsin, USA

Re: How to JOIN 3 Tables?

Post by MrProgrammer »

Victor P wrote:How to JOIN with JOIN 3 tables?
[Solved] LEFT JOIN with 3 tables

If this solved your problem please go to your first post use the Edit button and add [Solved] to the start of the subject field. Select the green checkmark icon at the same time.
Mr. Programmer
AOO 4.1.7 Build 9800, MacOS 13.7.6, iMac Intel.   The locale for any menus or Calc formulas in my posts is English (USA).
User avatar
Villeroy
Volunteer
Posts: 31349
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: How to JOIN 3 Tables?

Post by Villeroy »

Use "double-quotes" for all names of tables, columns, indices and aliases. You can omit quoting if the name is defined in full UPPER_CASE letters. The name must not conflict with any SQL keywords then.
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
Victor P
Posts: 7
Joined: Wed Oct 27, 2021 8:36 am

Re: How to JOIN 3 Tables?

Post by Victor P »

Thanks a lot. Good:
Select * From Table1 JOIN Table2 ON Table1.ID = Table2.ID JOIN Table3 ON Table2.ID2 = Table3.ID
OpenOffice 4.1.11 Windows 10
Post Reply