Cela vient de la conversion de MSSQL en MySQL. Ce qui suit est le code que j'essaie de mettre au travail:Aidez-moi avec cette jointure externe complète MySql (ou union)
CREATE TEMPORARY TABLE PageIndex (
IndexId int AUTO_INCREMENT NOT NULL PRIMARY KEY,
ItemId VARCHAR(64)
);
INSERT INTO PageIndex (ItemId)
SELECT Paths.PathId
FROM Paths,
((SELECT Paths.PathId
FROM AllUsers, Paths
WHERE Paths.ApplicationId = @ApplicationId
AND AllUsers.PathId = Paths.PathId
AND (@Path IS NULL
OR Paths.LoweredPath LIKE LOWER(@Path))) AS SharedDataPerPath
UNION -- This used to be a FULL OUTER JOIN but MySQL doesnt support that.
(SELECT DISTINCT Paths.PathId
FROM PerUser, Paths
WHERE Paths.ApplicationId = @ApplicationId
AND PerUser.PathId = Paths.PathId
AND (@Path IS NULL
OR Paths.LoweredPath LIKE LOWER(@Path))) AS UserDataPerPath
ON SharedDataPerPath.PathId = UserDataPerPath.PathId)
WHERE Paths.PathId = SharedDataPerPath.PathId OR Paths.PathId = UserDataPerPath.PathId
ORDER BY Paths.Path ASC;
Supposons que des variables existent déjà. Où cela casse est sur la partie 'As SharedDataPerPath', donc je devine que je alias une instruction select afin que vous puissiez y accéder comme une table n'est pas supportée par MySQL? Si le schéma de la table peut aider, répondez par un commentaire et je l'ajouterai à la question.
Merci d'avance!
Vous pouvez voter pour cette fonction à mettre en œuvre [à MySql] (http://bugs.mysql.com/bug.php?id=18003&thanks=3¬ify=67 –