The SQL statement you entered cannot be represented as a tree view

K

Kenneth

Any idea what does this mean?

Got an error below when trying to create a data connection to a SQL DB:

"The SQL statement you entered cannot be represented as a tree view. Do you
want to continue?"

The SQL statement I entered:

SELECT e.EmployeeID, e.LastName, e.FirstName, e.NickName, e.HiringStatus,
e.ReportsTo, e.PhoneExt, e.LocationCode, e.DisplayPhoto, e.Comments,
p.PositionDesc, ou.OrgUnitDesc, c.CompanyID, c.NewCompanyDesc
, e1.EmployeeID rtEmployeeID, e1.LastName rtLastName, e1.FirstName
rtFirstName, e1.NickName rtNickName, e1.PhoneExt rtPhoneExt, p1.PositionDesc
rtPositionDesc
FROM
((((((((dba_web.ApoTel3Employee e INNER JOIN dba_web.ApoTel3Company c ON
e.CompanyID=c.CompanyID) INNER JOIN
dba_web.ApoTel3OrgUnit ou ON e.OrgUnitID=ou.OrgUnitID AND
ou.CompanyID=c.CompanyID) INNER JOIN
dba_web.ApoTel3Position p ON e.PositionID=p.PositionID AND
p.CompanyID=c.CompanyID) INNER JOIN
dba_web.ApoTel3Employee e1 ON e.ReportsTo=e1.PositionID AND (NOT
(e1.HiringStatus='7F' AND e1.ReasonCode='') OR (e1.HiringStatus='7F' AND
e1.ReasonCode='7A') OR (e1.HiringStatus='7F' AND e1.ReasonCode='7B') OR
(e1.HiringStatus='7F' AND e1.ReasonCode='7C') OR (e1.HiringStatus='7F' AND
e1.ReasonCode='7D') OR (e1.HiringStatus='7F' AND e1.ReasonCode='7E') OR
(e1.HiringStatus='7F' AND e1.ReasonCode='7F') OR (e1.HiringStatus='7F' AND
e1.ReasonCode='7G') OR (e1.HiringStatus='7F' AND e1.ReasonCode='7H') OR
(e1.HiringStatus='7F' AND e1.ReasonCode='7I') OR (e1.HiringStatus='7F' AND
e1.ReasonCode='7J') OR (e1.HiringStatus='7F' AND e1.ReasonCode='7L') OR
(e1.HiringStatus='7F' AND e1.ReasonCode='7M') OR (e1.HiringStatus='7F' AND
e1.ReasonCode='7N') OR (e1.HiringStatus='7F' AND e1.ReasonCode='7P') OR
(e1.HiringStatus='7F' AND e1.ReasonCode='7Q') OR (e1.HiringStatus='7F' AND
e1.ReasonCode='7R') OR (e1.HiringStatus='7F' AND e1.ReasonCode='7Y') OR
(e1.HiringStatus='7F' AND e1.ReasonCode='7T'))) LEFT JOIN
dba_web.ApoTel3Company c1 ON e1.CompanyID=c1.CompanyID) LEFT JOIN
dba_web.ApoTel3OrgUnit ou1 ON e1.OrgUnitID=ou1.OrgUnitID AND
ou1.CompanyID=c1.CompanyID) LEFT JOIN
dba_web.ApoTel3Position p1 ON e1.PositionID=p1.PositionID AND
p1.CompanyID=c1.CompanyID))
WHERE e.EmployeeID='00001686'
AND (NOT (e.HiringStatus='7F' AND e.ReasonCode='') OR (e.HiringStatus='7F'
AND e.ReasonCode='7A') OR (e.HiringStatus='7F' AND e.ReasonCode='7B') OR
(e.HiringStatus='7F' AND e.ReasonCode='7C') OR (e.HiringStatus='7F' AND
e.ReasonCode='7D') OR (e.HiringStatus='7F' AND e.ReasonCode='7E') OR
(e.HiringStatus='7F' AND e.ReasonCode='7F') OR (e.HiringStatus='7F' AND
e.ReasonCode='7G') OR (e.HiringStatus='7F' AND e.ReasonCode='7H') OR
(e.HiringStatus='7F' AND e.ReasonCode='7I') OR (e.HiringStatus='7F' AND
e.ReasonCode='7J') OR (e.HiringStatus='7F' AND e.ReasonCode='7L') OR
(e.HiringStatus='7F' AND e.ReasonCode='7M') OR (e.HiringStatus='7F' AND
e.ReasonCode='7N') OR (e.HiringStatus='7F' AND e.ReasonCode='7P') OR
(e.HiringStatus='7F' AND e.ReasonCode='7Q') OR (e.HiringStatus='7F' AND
e.ReasonCode='7R') OR (e.HiringStatus='7F' AND e.ReasonCode='7Y') OR
(e.HiringStatus='7F' AND e.ReasonCode='7T'))
ORDER BY e.LastName, e.FirstName, e.NickName, c.NewCompanyDesc ASC
 
S

Scott L. Heim [MSFT]

Hi Kenneth,

This is not an error per sé - InfoPath is simply advising that based on the
SQL Statement, it cannot represent this information as a tree view.
However, if you can get through the balance of the wizard, it (the SQL
statement) should work - let me know if this is not the case.

Best Regards,

Scott L. Heim
Microsoft Developer Support

This posting is provided "AS IS" with no warranties, and confers no rights.
 
Top