Can someone help me with this SQL error, essentially u1 and u2 are pulling the same value
SELECT VIRSA_AE_ROLE_MAP.MAIN_SYSTEM,
VIRSA_AE_ROLE_MAP.MAIN_ROLE,
U1.ROLEPROFDISPNAME,
VIRSA_AE_ROLE_MAP.DEPENDANT_SYSTEM,
VIRSA_AE_ROLE_MAP.DEPENDANT_ROLE,
U2.ROLEPROFDISPNAME
FROM VIRSA_AE_ROLE_MAP
INNER JOIN VIRSA_AE_ROLDTLS U1
ON VIRSA_AE_ROLE_MAP.MAIN_ROLE = U1.ROLEPROFNAME
LEFT JOIN VIRSA_AE_ROLDTLS U2
开发者_如何转开发ON VIRSA_AE_ROLE_MAP.DEPENDANT_ROLE = U2.ROLEPROFNAME ;
the sub query inside the braces is not a valid select
Your question isn't clear. You posted a SELECT statement above, not a SQL error. What is the error you need help with?
I can take a wild guess and say you probably put brackets in the wrong places and want:
SELECT VIRSA_AE_ROLE_MAP.MAIN_SYSTEM, VIRSA_AE_ROLE_MAP.MAIN_ROLE, U1.ROLEPROFDISPNAME, VIRSA_AE_ROLE_MAP.DEPENDANT_SYSTEM, VIRSA_AE_ROLE_MAP.DEPENDANT_ROLE, U2.ROLEPROFDISPNAME FROM VIRSA_AE_ROLE_MAP INNER JOIN VIRSA_AE_ROLDTLS U1 ON VIRSA_AE_ROLE_MAP.MAIN_ROLE = U1.ROLEPROFNAME LEFT JOIN VIRSA_AE_ROLDTLS U2 ON VIRSA_AE_ROLE_MAP.DEPENDANT_ROLE = U2.ROLEPROFNAME
Does that help?
精彩评论