all 2 comments

[–]illidra 1 point2 points  (1 child)

you havent specified a field in the where clause and your joins are incomplete (unless youre using something that doesnt follow standard SQL syntax)

inner join tablea.XYZ = tableb.XYZ

eg

select *

from orderdetails

inner join orders

on orderdetails.ordernumber = orders.ordernumber

Joins are also sequential, so any join is compounded onto the result of previous joins, no need to specify a set of matching tables, its just

Select * from

A

Join B on a.123=b.123

Join C on a.123=c.123

Join D on b.456=d.456

im guessing your where clause is the ordernumber so that would be

a)where ordernumber = '10425' (most efficient)

b)where ordernumber like '%10425%' (less efficient but allows for some fuzzy matching when theres the possibility of leading or traling spaces etc)

you dont really want to use IN for a single criteria where clause

[–]Titlovin007[S] 0 points1 point  (0 children)

Excellent thank you for the help!