Skip to content
Advertisement

I am trying to Join Xn tables on SQL and I am getting a syntax error

I tried this

I got this error message Error 1: could not prepare statement (1 near “(“: syntax error)

I also tried this and another error

I got this error message Error 1: could not prepare statement (1 no such column: o.OrderID)

Advertisement

Answer

I”m not sure where those parentheses are coming from. The error message is pretty clear: Most select statements do not start with an open paren.

This should do what you want:

User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement