troubleshooting Question

SQL - Syntax Query v3

Avatar of Zack
ZackFlag for Australia asked on
SQLMicrosoft SQL Server
7 Comments1 Solution9 ViewsLast Modified:
Hi EE,

For the following code

SELECT        T1.PROJLINKEDTOORDER, T1.ITEMID, T1.NAME, T1.PRODGROUPID, T1.PRODSTATUS, T1.PRODPRIO, T1.PRODLOCKED, T1.PRODID,
                         T1.PRODPOSTINGTYPE, T1.PRODTYPE, T1.SCHEDSTATUS, T1.DLVDATE, T1.STUPDATE, T1.FINISHEDDATE, T1.SCHEDSTART, T1.SCHEDEND,
                         T1.SCHEDDATE, T1.PROJSALESCURRENCYID, T1.DATAAREAID, 1010 AS RECID, T2.DATAAREAID AS DATAAREAID#2, T2.INVENTLOCATIONID,
                         T3.DATAAREAID AS DATAAREAID#3, T4.DATAAREAID AS DATAAREAID#4
FROM            dbo.PRODTABLE AS T1 INNER JOIN
                         dbo.INVENTDIM AS T2 LEFT OUTER JOIN
                         dbo.PRODROUTETRANS AS T3 ON T3.TRANSREFTYPE = 0 AND T1.PRODID = T3.TRANSREFID AND T1.DATAAREAID = T3.DATAAREAID LEFT OUTER JOIN
                         dbo.PRODROUTE AS T4 ON T1.PRODID = T4.PRODID AND T1.DATAAREAID = T4.DATAAREAID ON T1.INVENTDIMID = T2.INVENTDIMID AND
                         T1.DATAAREAID = T2.DATAAREAID
GROUP BY T1.PROJLINKEDTOORDER, T1.ITEMID, T1.NAME, T1.PRODGROUPID, T1.PRODSTATUS, T1.PRODPRIO, T1.PRODLOCKED, T1.PRODID,
                         T1.PRODPOSTINGTYPE, T1.PRODTYPE, T1.SCHEDSTATUS, T1.DLVDATE, T1.STUPDATE, T1.FINISHEDDATE, T1.SCHEDSTART, T1.SCHEDEND,
                         T1.SCHEDDATE, T1.PROJSALESCURRENCYID, T1.DATAAREAID, T2.DATAAREAID, T2.INVENTLOCATIONID, T3.DATAAREAID, T4.DATAAREAID


                   select prodid, DATAAREAID
                   from PRODTABLE

Open in new window


None of the aliases for T1 are recognized not too sure why.

Any assistance is welcome.

Thank you. 
ASKER CERTIFIED SOLUTION
Join our community to see this answer!
Unlock 1 Answer and 7 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 7 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros