Error description: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') as tmpTable' at line 1 SQL: Select CONCAT(Title, ' ', Forename, ' ', Surname) as Name, GROUP_CONCAT(myLink SEPARATOR '
') As Documents from (Select A.Title, A.Forename, A.Surname, AE.EmailAddress, CONCAT('', AD.Description, '') As myLink From Applicant A Left outer join appEmailAddress AE on AE.No = A.No Left Outer Join appDocument AD on AD.No = A.No where A.No = ) as tmpTable