Click here to Skip to main content
15,893,594 members
Home / Discussions / Database
   

Database

 
GeneralRe: LEFT JOIN - GET ONLY ONE RESULT FROM RIGHT TABLE Pin
Wendelius13-Oct-08 18:12
mentorWendelius13-Oct-08 18:12 
GeneralRe: LEFT JOIN - GET ONLY ONE RESULT FROM RIGHT TABLE Pin
polishprogrammer14-Oct-08 3:38
polishprogrammer14-Oct-08 3:38 
GeneralRe: LEFT JOIN - GET ONLY ONE RESULT FROM RIGHT TABLE Pin
Wendelius14-Oct-08 5:02
mentorWendelius14-Oct-08 5:02 
GeneralRe: LEFT JOIN - GET ONLY ONE RESULT FROM RIGHT TABLE Pin
polishprogrammer15-Oct-08 7:16
polishprogrammer15-Oct-08 7:16 
QuestionMS DTC has cancelled the transaction [modified] Pin
moon_stick13-Oct-08 5:10
moon_stick13-Oct-08 5:10 
AnswerRe: MS DTC has cancelled the transaction Pin
Wendelius13-Oct-08 5:50
mentorWendelius13-Oct-08 5:50 
GeneralRe: MS DTC has cancelled the transaction [modified] Pin
moon_stick13-Oct-08 6:07
moon_stick13-Oct-08 6:07 
GeneralRe: MS DTC has cancelled the transaction Pin
Wendelius13-Oct-08 7:20
mentorWendelius13-Oct-08 7:20 
I made a simple test case and ran it in both SQL Server 2008 and 2005 without DTC and had no problems. The test was the following:
CREATE TABLE Test1 (
Column1 varchar(50)
);

INSERT INTO Test1 (Column1)
VALUES ('ABC');

CREATE TABLE Test2 (
Column2 varchar(50)
);

UPDATE Test1
SET Test1.Column1 = Test2.Column2
FROM Test2

UPDATE Test1
SET Test1.Column1 = a.Column2
FROM Test2 a
INNER JOIN Test2 b
ON a.Column2 = b.Column2

In all cases I received 0 rows updated as expected. I was curious since typically if DTC makes a stop it's because an error has occured in some node and it simply rolls back all pending transactions. So I was thinking that there may be another error behind the one you received, but I had no confirmation for that.

One thing you could test is to modify your statement like this:
UPDATE MyTable
SET p.Column1 = (SELECT pm.Column1
                 FROM Property p
                 inner join Address a
                 on p.PropertyRef = a.PropertyRef
                 inner join remotedb.PropertyMaster pm
                 on pm.PropertyRef = p.PropertyRef)

Perhaps there's a difference in the behaviour or at least you get some other info.

The need to optimize rises from a bad design.

My articles[^]

GeneralRe: MS DTC has cancelled the transaction Pin
moon_stick13-Oct-08 9:24
moon_stick13-Oct-08 9:24 
GeneralRe: MS DTC has cancelled the transaction Pin
Wendelius13-Oct-08 9:35
mentorWendelius13-Oct-08 9:35 
GeneralRe: MS DTC has cancelled the transaction Pin
moon_stick15-Oct-08 23:24
moon_stick15-Oct-08 23:24 
GeneralRe: MS DTC has cancelled the transaction Pin
Wendelius16-Oct-08 8:42
mentorWendelius16-Oct-08 8:42 
QuestionSql Pin
Rajeesrivastava12-Oct-08 21:25
Rajeesrivastava12-Oct-08 21:25 
AnswerRe: Sql - 3RD POST!!!!!!!!!!!!!!!!! Pin
Ashfield12-Oct-08 22:12
Ashfield12-Oct-08 22:12 
GeneralRe: Sql - 3RD POST!!!!!!!!!!!!!!!!! Pin
Paul Conrad13-Oct-08 12:51
professionalPaul Conrad13-Oct-08 12:51 
QuestionHow to solve the error "The query builder failed." Pin
kyi kyi12-Oct-08 21:23
kyi kyi12-Oct-08 21:23 
AnswerRe: How to solve the error "The query builder failed." Pin
kyi kyi12-Oct-08 21:32
kyi kyi12-Oct-08 21:32 
AnswerRe: How to solve the error "The query builder failed." Pin
Wendelius13-Oct-08 5:56
mentorWendelius13-Oct-08 5:56 
QuestionSQL Triggers... Pin
Illegal Operation12-Oct-08 19:33
Illegal Operation12-Oct-08 19:33 
AnswerRe: SQL Triggers... Pin
Mycroft Holmes12-Oct-08 20:27
professionalMycroft Holmes12-Oct-08 20:27 
GeneralRe: SQL Triggers... Pin
Illegal Operation13-Oct-08 16:14
Illegal Operation13-Oct-08 16:14 
GeneralRe: SQL Triggers... Pin
Mycroft Holmes13-Oct-08 16:58
professionalMycroft Holmes13-Oct-08 16:58 
AnswerRe: SQL Triggers... Pin
nelsonpaixao13-Oct-08 12:40
nelsonpaixao13-Oct-08 12:40 
QuestionBulk Insert Pin
Mhiny12-Oct-08 19:29
Mhiny12-Oct-08 19:29 
AnswerRe: Bulk Insert Pin
Wendelius13-Oct-08 5:34
mentorWendelius13-Oct-08 5:34 

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.