WD11 - SQL Problem under mySQL

Startbeitrag von swissstephan am 21.07.2009 22:36

I'm still trying to change my database from HFCS to mySQL.

I have three tables Orderfolio, Addresses and Contacts.
Every Orderfolio line has an address but there are some which dont have a contact.
WD11 generates the following code which works perfectly under HFCS but returns an error under mySQL (1066 Not unique table/alias 'Orderfolio')

OrderFolio.OrderfolioID AS OrderfolioID,
OrderFolio.ClientID AS ClientID,
OrderFolio.ClientContactID AS ClientContactID,
OrderFolio.CompanyID AS CompanyID,
Addresses.AddressID AS AddressID,
Addresses.AddressNumb AS AddressNumb,
Addresses.SortName AS SortName,
Contacts.ContactsID AS ContactsID,
Contacts.ContactsNumb AS ContactsNumb,
Contacts.SortName AS SortName_Co
Contacts RIGHT OUTER JOIN OrderFolio ON Contacts.ContactsID = OrderFolio.ClientContactID,
OrderFolio INNER JOIN Addresses ON OrderFolio.ClientID = Addresses.AddressID
OrderFolio.CompanyID = {qnCompanyID}

Any help would be appreciated :-)
Kind regards


Such complex selects can often baffle WD especially since you are still on WD11. Short of upgrading to WD12/14, I suggest you create a view on MySQL and then you query it from WD. That takes the complexity away from WD into MySQL which has a stronger SQL implementation.

I hope this helps



von issah - am 23.07.2009 21:36
Zur Information:
MySnip.de hat keinen Einfluss auf die Inhalte der Beiträge. Bitte kontaktieren Sie den Administrator des Forums bei Problemen oder Löschforderungen über die Kontaktseite.
Falls die Kontaktaufnahme mit dem Administrator des Forums fehlschlägt, kontaktieren Sie uns bitte über die in unserem Impressum angegebenen Daten.