Database Error

Error message returned from the database:

Could not execute query [Native Error: 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 valueID FROM SpecificationDateValue LEFT JOIN SpecField ON specFieldID ' at line 1] [User Info: SELECT SpecificationDateValue.*, NULL AS valueID, NULL AS specFieldValuePosition, SpecFieldGroup.position AS SpecFieldGroupPosition, SpecFieldGroup.name AS SpecFieldGroupName, SpecField.* as valueID FROM SpecificationDateValue LEFT JOIN SpecField ON specFieldID = SpecField.ID LEFT JOIN SpecFieldGroup ON SpecField.specFieldGroupID = SpecFieldGroup.ID WHERE productID IN (10811) UNION SELECT SpecificationStringValue.*, NULL, NULL AS specFieldValuePosition, SpecFieldGroup.position AS SpecFieldGroupPosition, SpecFieldGroup.name AS SpecFieldGroupName, SpecField.* as valueID FROM SpecificationStringValue LEFT JOIN SpecField ON specFieldID = SpecField.ID LEFT JOIN SpecFieldGroup ON SpecField.specFieldGroupID = SpecFieldGroup.ID WHERE productID IN (10811) UNION SELECT SpecificationNumericValue.*, NULL, NULL AS specFieldValuePosition, SpecFieldGroup.position AS SpecFieldGroupPosition, SpecFieldGroup.name AS SpecFieldGroupName, SpecField.* as valueID FROM SpecificationNumericValue LEFT JOIN SpecField ON specFieldID = SpecField.ID LEFT JOIN SpecFieldGroup ON SpecField.specFieldGroupID = SpecFieldGroup.ID WHERE productID IN (10811) UNION SELECT SpecificationItem.productID, SpecificationItem.specFieldID, SpecFieldValue.value, SpecFieldValue.ID, SpecFieldValue.position, SpecFieldGroup.position AS SpecFieldGroupPosition, SpecFieldGroup.name AS SpecFieldGroupName, SpecField.* FROM SpecificationItem LEFT JOIN SpecFieldValue ON SpecificationItem.specFieldValueID = SpecFieldValue.ID LEFT JOIN SpecField ON SpecificationItem.specFieldID = SpecField.ID LEFT JOIN SpecFieldGroup ON SpecField.specFieldGroupID = SpecFieldGroup.ID WHERE productID IN (10811) ORDER BY productID, SpecFieldGroupPosition, position, specFieldValuePosition]