Search Results

Search found 1 results on 1 pages for 'user1486004'.

Page 1/1 | 1 

  • Multiple JOIN and SELECT Statements from eight tables

    - by user1486004
    I am trying to make an SQL statement that takes eight different numbers and searches eight different tables from one database for the corresponding value. I keep getting invalid syntax, but I can't figure out why. Here is my code: SELECT cable_length.ID, drawing.ID, optional.ID, output_type.ID, pressure_range.ID, pressure_type.ID, series.ID, termination.ID FROM ( SELECT value AS cable_length FROM A1 WHERE A1.id = %s JOIN SELECT value AS drawing FROM A2 WHERE A2.id = %s, JOIN SELECT value AS optional FROM A3 WHERE A3.id = %s, JOIN SELECT value AS output_type FROM A4 WHERE A4.id = %s, JOIN SELECT value AS pressure_range FROM A5 WHERE A5.id = %s, JOIN SELECT value AS pressure_type FROM A6 WHERE A6.id = %s, JOIN SELECT value AS series FROM A7 WHERE A7.id = %s, JOIN SELECT value AS termination FROM A8 WHERE A8.id = %s ); The %s will be changed to numbers only. The column name in each database is "ID" and "Value". I want to search by "ID" and return "Value". Any help is greatly appreciated.

    Read the article

1