You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
SELECT*FROM businessunit AS b CROSS APPLY (SELECT TOP 1s.systemuseridFROM systemuser AS s
INNER JOIN
businessunit AS b1
ONs.businessunitid=b1.businessunitidANDb1.businessunitid=b.businessunitid--ERROR: "Unknown column: b.businessunitid"ORDER BYs.createdonDESC) AS newest_user;
Error message:
Unknown column: b.businessunitid
Thanks in advance for your support.
The text was updated successfully, but these errors were encountered:
hiroyuki0415
changed the title
【Bug?】The alias of the table on the left cannot be used in the ON condition in CROSS JOIN
【Bug?】"Unknown column" ERROR in the ON condition in CROSS JOIN
Oct 23, 2023
Thanks, this will be fixed in the next update. In the meantime you can either move this predicate to the WHERE clause:
SELECT*FROM businessunit AS b CROSS APPLY (SELECT TOP 1s.systemuseridFROM systemuser AS s
INNER JOIN
businessunit AS b1
ONs.businessunitid=b1.businessunitidWHEREb1.businessunitid=b.businessunitidORDER BYs.createdonDESC) AS newest_user;
or remove the join entirely:
SELECT*FROM businessunit AS b CROSS APPLY (SELECT TOP 1s.systemuseridFROM systemuser AS s
WHEREs.businessunitid=b.businessunitidORDER BYs.createdonDESC) AS newest_user;
The following SQL cannot be executed.
Error message:
Thanks in advance for your support.
The text was updated successfully, but these errors were encountered: