SELECT/JOIN Correlation Error
Posted on 2008-10-03
Here's the code:
SELECT armast.fcinvoice, armast.fcstatus, armast.flisprint, aritem.fitem,
aritem.fpartno, armast.fnumber, armast.fcsource, armast.fsono,
armast.finvtype, shmast.fshipno, shmast.fcstate
FROM armast, aritem, shmast
LEFT JOIN shmast on armast.fnumber = shmast.fshipno
WHERE Armast.fcinvoice = Aritem.fcinvoice
AND Armast.fnumber = shmast.fshipno
Here's the error message:
The objects "shmast" and "shmast" in the FROM clause have the same exposed names. Use correlation names to distinguish them.
I looked at some answers on this error on this site, but am not having much luck getting my error resolved. Obviously, I'm not using alias names the right way when I try using them. How do I fix this one?