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 (8479, 8480, 8481, 8482, 8483, 8484, 8485, 8486, 8487, 8488, 8489, 8490) AND SpecField.isDisplayedInList = 1 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 (8479, 8480, 8481, 8482, 8483, 8484, 8485, 8486, 8487, 8488, 8489, 8490) AND SpecField.isDisplayedInList = 1 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 (8479, 8480, 8481, 8482, 8483, 8484, 8485, 8486, 8487, 8488, 8489, 8490) AND SpecField.isDisplayedInList = 1 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 (8479, 8480, 8481, 8482, 8483, 8484, 8485, 8486, 8487, 8488, 8489, 8490) AND SpecField.isDisplayedInList = 1 ORDER BY productID, SpecFieldGroupPosition, position, specFieldValuePosition]