Reply to Re: UPDATE Statement Involving Tables in Different Databases

Your name:

Reply:


Posted by Altemir on 03/12/06 23:32

Erland Sommarskog wrote:
>
> If the databases are on the same instance of SQL Server, there is no
> need for any distributed transaction. If you get this message, you
> have somehow introduced a four-part notation into the mix.
>
> If the databases are on different instances, you need one, even if the
> instance are on the same machine.
>
> What applies to your case? What exact syntax did you use?

Sorry for the long delay in following this up ...

I'm only working with one instance of both databases. Don't know what
you mean by four-part notation.

Here is the SQL statement that is generating the "'SQLOLEDB' was unable
to begin a distributed transaction" error as I stated before. As you
can see, I am attempting to perform an UPDATE of a table in database
"MFG" based on the recordset generated by joining three tables
together:


UPDATE MFG.dbo.PURC_ORDER_LINE SET MFG.dbo.PURC_ORDER_LINE.USER_1 =
'Vendor'
WHERE ROWID IN
(SELECT MFG.dbo.PURC_ORDER_LINE.ROWID FROM
Status.dbo.tblPOBaselineDueDates INNER JOIN MFG.dbo.PURC_ORDER_LINE ON
Status.dbo.tblPOBaselineDueDates.PURC_ORDER_ID =
MFG.dbo.PURC_ORDER_LINE.PURC_ORDER_ID AND
Status.dbo.tblPOBaselineDueDates.LINE_NO =
MFG.dbo.PURC_ORDER_LINE.LINE_NO INNER JOIN
Status.dbo.qryPODueDates ON
MFG.dbo.PURC_ORDER_LINE.PURC_ORDER_ID =
Status.dbo.qryPODueDates.PURC_ORDER_ID AND
MFG.dbo.PURC_ORDER_LINE.LINE_NO = Status.dbo.qryPODueDates.LINE_NO AND
Status.dbo.tblPOBaselineDueDates.BaselineDueDate =
Status.dbo.qryPODueDates.CurrentDueDate
WHERE (MFG.dbo.PURC_ORDER_LINE.USER_1 LIKE 'Aut%'))

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация