Advertisement

03.26.2005 at 03:46PM PST, ID: 21365736
[x]
Attachment Details

Join in a Delete Query

Asked by Gonzo84 in MS SQL Server

Tags: , ,

Is it possible to have a join in a delete query.  Lets say i have a select statement that looks like this, is it possible to delete from the tblTemp table using a similar join, at the moment i am using sub queries to do the job but its not great!

SELECT * FROM tblTEMP
LEFT JOIN tblJobs
ON tblTEMP.UniID = tblJobs.uniID
WHERE JobID = @JobIDStart Free Trial
[+][-]03.26.2005 at 03:47PM PST, ID: 13637630

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: MS SQL Server
Tags: delete, join, query
Sign Up Now!
Solution Provided By: apresto
Participating Experts: 2
Solution Grade: A
 
 
[+][-]03.26.2005 at 03:49PM PST, ID: 13637634

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03.26.2005 at 03:55PM PST, ID: 13637654

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32