Solved

TSQL Before CTE ? Not working

Posted on 2014-04-27
3
238 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
  • 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 500 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Excel 2016 Not Responding Issues 6 28
Generate Weekly Schedule 15 16
SQL - SP needs a little help 9 21
MSSQL Speen Degradation 4 7
Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.
Outlook Free & Paid Tools
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 make your own table of contents in Microsoft Word using paragraph styles and the automatic table of contents tool. We'll be using the paragraph styles in Word’s Home toolbar to help you create a table of contents. Type out your initial …

911 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now