Relative Content

Tag Archive for sqlsqlanywhere

Using TOP 1 in LEFT JOIN subquery not working – SQLAnywhere

According to all the documentation I have read this should work on most sql databases. I am running SQLAnywhere and it’s docs say this should work.
I am aware that I could run this as a normal subquery from within the SELECT section but I need to get multiple columns (I have cut this down for simplicity).
Adding ‘TOP 1’ to a subquery in a LEFT JOIN to get only the single row wont return any results for me. Running the subquery on it’s own works perfectly. I have also tried using the LIMIT key word with the same nil results.
Any suggestions please?