Solved

TSQL Before CTE ? Not working

Posted on 2014-04-27
3
234 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
Comment Utility
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
Comment Utility
Place a semi-colon after the delete statement or before the "WITH"
0
 

Author Comment

by:Rayne
Comment Utility
Perfect Brian, thank you :)
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

This article will show you how to use shortcut menus in the Access run-time environment.
Outlook Free & Paid Tools
The viewer will learn how to simulate a series of sales calls dependent on a single skill level and learn how to simulate a series of sales calls dependent on two skill levels. Simulating Independent Sales Calls: Enter .75 into cell C2 – “skill leve…
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 …

771 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

11 Experts available now in Live!

Get 1:1 Help Now