I am having a problem with SSMS 2017 recognizing a simple CTE recursive query I have created.
When I run this very simple one column query as a SELECT statement I get no problems:
I have changed the info in X to protect the source as this for my real-world job. S/B understood.
FROM XXXXXXXdbo.fmHierarchyAnalysis; The field is a PK, int, not null.
when I insert the CTE condition on this very same query as shown below:
with HIDcte as (
select * FROM XXXXXX.dbo.fmHierarchyAnalysis
SSMS throws the following msg:
Msg 4104, Level 16, State 1, Line 2
The multi-part identifier "fmHierarchyAnalysis.HID" could not be bound.
The table does exist. This is just beginning of what I hope will a full recursive query on two tables. I used this one since it has less fields.
I suspect this is a syntax error.