?
Solved

TSQL Before CTE ? Not working

Posted on 2014-04-27
3
Medium Priority
?
255 Views
Last Modified: 2014-04-27
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
Comment
Question by:Rayne
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 

Author Comment

by:Rayne
ID: 40026573
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
 
LVL 34

Accepted Solution

by:
Brian Crowe earned 2000 total points
ID: 40026577
Place a semi-colon after the delete statement or before the "WITH"
0
 

Author Comment

by:Rayne
ID: 40026586
Perfect Brian, thank you :)
0

Featured Post

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article helps those who get the 0xc004d307 error when trying to rearm (reset the license) Office 2013 in a Virtual Desktop Infrastructure (VDI) and/or those trying to prep the master image for Microsoft Key Management (KMS) activation. (i.e.- C…
This article describes how you can use Custom Document Properties to store settings and other information in your workbook so that they will be available the next time you open the workbook.
The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …
Learn how to create and modify your own paragraph styles in Microsoft Word. This can be helpful when wanting to make consistently referenced styles throughout a document or template.

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question