With Clause, Incorrect syntax near ')'. (SQL Server 2016) -
i using clause , have run odd issue. simple queries getting incorrect syntax error returned , can't figure out why be.
whenever run code simple as:
with table1 (select value1, value2 table1) i 'incorrect syntax near ')' ' error.
i using before without trouble, feel i'm making obvious dumb mistake i'm not catching. point out i'm doing wrong?
it cte - need select @ end of it.
i.e.
with cte ( select value1, value2 table1 ) select * cte additionally, having cte named same table you're pulling from, not idea. had them both table1.
Comments
Post a Comment