Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 264
  • Last Modified:

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
0
Rayne
Asked:
Rayne
  • 2
1 Solution
 
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
 
Brian CroweDatabase AdministratorCommented:
Place a semi-colon after the delete statement or before the "WITH"
0
 
RayneAuthor Commented:
Perfect Brian, thank you :)
0

Featured Post

Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now