Click here to Skip to main content
15,909,324 members
Home / Discussions / Database
   

Database

 
QuestionAny way to attach a timestamp/rowversion column only to selected columns? Pin
supercat923-May-08 14:24
supercat923-May-08 14:24 
QuestionFind Instances Pin
mehrdadc4823-May-08 10:42
mehrdadc4823-May-08 10:42 
AnswerRe: Find Instances Pin
Alsvha23-May-08 21:01
Alsvha23-May-08 21:01 
AnswerRe: Find Instances Pin
mr.mohsen23-May-08 21:22
mr.mohsen23-May-08 21:22 
QuestionUPDATE JOIN problem Pin
Kevin Brydon23-May-08 3:56
Kevin Brydon23-May-08 3:56 
AnswerRe: UPDATE JOIN problem Pin
Ashfield23-May-08 4:01
Ashfield23-May-08 4:01 
GeneralRe: UPDATE JOIN problem Pin
Kevin Brydon23-May-08 4:10
Kevin Brydon23-May-08 4:10 
AnswerRe: UPDATE JOIN problem Pin
Alsvha23-May-08 5:51
Alsvha23-May-08 5:51 
You can - as far as I know - only update one base table at the time.

You can however use INNER JOINS for updateable queries - but still only when they affect one table such .

The problem in your syntax is not that you try to update two tables at once, but that you have the wrong syntax for updating using a join.

The easy way would be something like:

UPDATE Courses 
SET Courses.IsDeleted=1, Courses.DeletedOn=@DeletedOn
FROM Cources
INNER JOIN Deliveries ON Courses.CourseID = Deliveries.CourseID 
WHERE Courses.CourseID=@CourseID


And then run it a second time for updates in the Deliveries table.

If you even need to use a JOIN for your update when you can't do both tables at once, of course.


GeneralRe: UPDATE JOIN problem Pin
Kevin Brydon23-May-08 6:19
Kevin Brydon23-May-08 6:19 
Questionupdateing problem Pin
asha_s23-May-08 2:31
asha_s23-May-08 2:31 
AnswerRe: updateing problem Pin
Ashfield23-May-08 3:43
Ashfield23-May-08 3:43 
GeneralRe: updateing problem Pin
asha_s23-May-08 4:17
asha_s23-May-08 4:17 
GeneralRe: updateing problem Pin
Kevin Brydon23-May-08 4:37
Kevin Brydon23-May-08 4:37 
GeneralRe: updateing problem Pin
asha_s23-May-08 4:49
asha_s23-May-08 4:49 
GeneralRe: updateing problem Pin
Ashfield23-May-08 5:43
Ashfield23-May-08 5:43 
GeneralRe: updateing problem Pin
asha_s23-May-08 6:11
asha_s23-May-08 6:11 
GeneralRe: updateing problem Pin
Ashfield26-May-08 6:24
Ashfield26-May-08 6:24 
GeneralRe: updateing problem Pin
asha_s26-May-08 7:21
asha_s26-May-08 7:21 
GeneralRe: updateing problem Pin
Ashfield26-May-08 21:11
Ashfield26-May-08 21:11 
GeneralRe: updateing problem Pin
Ashfield23-May-08 5:46
Ashfield23-May-08 5:46 
QuestionHow can I export to database ? Pin
dataminers23-May-08 1:51
dataminers23-May-08 1:51 
AnswerRe: How can I export to database ? Pin
Mark J. Miller23-May-08 6:03
Mark J. Miller23-May-08 6:03 
Questionsql database Pin
sathyan_829423-May-08 1:29
sathyan_829423-May-08 1:29 
AnswerRe: sql database Pin
dataminers23-May-08 2:01
dataminers23-May-08 2:01 
GeneralRe: sql database Pin
ankswe23-May-08 2:57
ankswe23-May-08 2:57 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.