TSQL Before CTE ? Not working

Hello,

I have a statement like this:

delete from tblA

with R_CTE (


)

etc


the issue is that the tsql is not working when i giving the delete statement before the CTE declaration...how can this work?

Thank you
RayneAsked:
Who is Participating?
 
Brian CroweConnect With a Mentor Database AdministratorCommented:
Place a semi-colon after the delete statement or before the "WITH"
0
 
RayneAuthor Commented:
if i comment out the Delete sql, the engine recognizes the CTE but if I un-comment the delete statement, it doesn't recognizes the CTE.
0
 
RayneAuthor Commented:
Perfect Brian, thank you :)
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.