Can someone explain why the query below is getting the syntax error below?
How could I re-write this query to do a LEFT OUTER JOIN on the fields/columns below?
[SQL]: select ts,tr.type,et.text,tr.n,tr.loc_n,bus,drv,run,route,ttp,grp,des,seq,tpbc,longitude,latitude,tr.fs,amt
FROM tr LEFT OUTER JOIN trd ON tr.loc_n=trd.loc_n
LEFT OUTER JOIN tr ON tr.loc_n=ppd.loc_n
LEFT OUTER JOIN tr ON tr.id=ppd.id
LEFT OUTER JOIN tr ON tr.tr_seq=ppd.tr_seq
LEFT OUTER JOIN tr ON tr.loc_n=trmis.loc_n
LEFT OUTER JOIN tr ON tr.id=trmis.id
LEFT OUTER JOIN tr ON tr.tr_seq=trmis.tr_seq
LEFT OUTER JOIN tr ON tr.type=et.type
where ts >= '2016-09-19 04:00:00.000' and ts <= '2016-09-21 03:59:00.000'
and drv in (17410)
order by ts
[Error]: The objects "tr" and "tr" in the FROM clause have the same exposed names. Use correlation names to distinguish them.
How could I re-write this query to do a LEFT OUTER JOIN on the fields/columns below?
[SQL]: select ts,tr.type,et.text,tr.n,tr.loc_n,bus,drv,run,route,ttp,grp,des,seq,tpbc,longitude,latitude,tr.fs,amt
FROM tr LEFT OUTER JOIN trd ON tr.loc_n=trd.loc_n
LEFT OUTER JOIN tr ON tr.loc_n=ppd.loc_n
LEFT OUTER JOIN tr ON tr.id=ppd.id
LEFT OUTER JOIN tr ON tr.tr_seq=ppd.tr_seq
LEFT OUTER JOIN tr ON tr.loc_n=trmis.loc_n
LEFT OUTER JOIN tr ON tr.id=trmis.id
LEFT OUTER JOIN tr ON tr.tr_seq=trmis.tr_seq
LEFT OUTER JOIN tr ON tr.type=et.type
where ts >= '2016-09-19 04:00:00.000' and ts <= '2016-09-21 03:59:00.000'
and drv in (17410)
order by ts
[Error]: The objects "tr" and "tr" in the FROM clause have the same exposed names. Use correlation names to distinguish them.