Quantcast
Channel: MySQL Forums - Connector/J, JDBC and Java
Viewing all articles
Browse latest Browse all 884

Not unique table/alias Problem (1 reply)

$
0
0
Hi,

I have an interesting problem. I have a sql generator that reads a data model and creates the corresponding SQL. Its generated SQL runs in MySQL Workbench but fails in my appliction with the following exception:

com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Not unique table/alias: 'AlertStatus'

Here is the very simple SQL Statement. Any ideas? Thanks in advance

SELECT
Alert.AlertID,
AlertType.Image,
AlertStatus.Status,
Alert.Date,
Alert.Alert,
Alert.Description,
Alert.Exception,
AlertDomain.Domain,
Organization.Name
FROM Alert
INNER JOIN AlertStatus ON Alert.AlertStatusID = AlertStatus.AlertStatusID
INNER JOIN AlertType ON Alert.AlertTypeID = AlertType.AlertTypeID
INNER JOIN AlertDomain ON Alert.AlertDomainID = AlertDomain.AlertDomainID
INNER JOIN Organization ON Alert.OrganizationID = Organization.OrganizationID
WHERE 1=1 LIMIT 0,20

Viewing all articles
Browse latest Browse all 884

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>