Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2008 Forums
 Transact-SQL (2008)
 Multiple Conditions in an "IN" clause

Author  Topic 

ferrethouse
Constraint Violating Yak Guru

352 Posts

Posted - 2011-09-08 : 13:27:33
I have this query...


UPDATE LearningPathSubscription SET Progress = dbo.FuncGetLearningPathProgress(StudentsID, LearningPathID) WHERE StudentsID IN (SELECT StudentsID FROM Inserted);


And I want something like this...


UPDATE LearningPathSubscription SET Progress = dbo.FuncGetLearningPathProgress(StudentsID, LearningPathID) WHERE StudentsID,CourseID IN (SELECT StudentsID,CourseID FROM Inserted);


I know that isn't possible. How do you structure the query to accomplish what I'm trying to accomplish?

mfemenel
Professor Frink

1421 Posts

Posted - 2011-09-08 : 14:17:13
Inner join Inserted and LearningPathSubscription rather than use an IN

Mike
"oh, that monkey is going to pay"
Go to Top of Page
   

- Advertisement -