Monday, March 19, 2012

servers

I am testing linking an unsecured Access database to my SQL 2000 server. I
have been successfully been able to link the server and map a login to view
the data.
I am trying to figure out how to create an update statement in TSQL. I am
using the Cutomer table in the linked NWind database. Can someone help with
the syntax of translating the following syntax:
UPDATE Cutsomers
SET CustomerName = 'Anders'
WHERE CustomerID = 'ALFKI'
into a linked query.
Thank you,
JLFleming
Have you tried using a 4 part name, as in the following?
UPDATE LinkedServer...Customers
SET CustomerName = 'Anders'
WHERE CustomerID = 'ALFKI'
HTH,
Vyas, MVP (SQL Server)
SQL Server Articles and Code Samples @. http://vyaskn.tripod.com/
"JLFleming" <JLFleming@.discussions.microsoft.com> wrote in message
news:7E155BC0-BF89-485F-99E7-A116002CFACC@.microsoft.com...
I am testing linking an unsecured Access database to my SQL 2000 server. I
have been successfully been able to link the server and map a login to view
the data.
I am trying to figure out how to create an update statement in TSQL. I am
using the Cutomer table in the linked NWind database. Can someone help with
the syntax of translating the following syntax:
UPDATE Cutsomers
SET CustomerName = 'Anders'
WHERE CustomerID = 'ALFKI'
into a linked query.
Thank you,
JLFleming
|||UPDATE [linkedServername]..Customers
SET Companyname = 'Anders'
WHERE CustomerID = 'ALFKI'
"JLFleming" wrote:

> I am testing linking an unsecured Access database to my SQL 2000 server. I
> have been successfully been able to link the server and map a login to view
> the data.
> I am trying to figure out how to create an update statement in TSQL. I am
> using the Cutomer table in the linked NWind database. Can someone help with
> the syntax of translating the following syntax:
> UPDATE Cutsomers
> SET CustomerName = 'Anders'
> WHERE CustomerID = 'ALFKI'
> into a linked query.
> Thank you,
> JLFleming
|||Thank you. I thought I might need to use the OPENQUERY command.
"Narayana Vyas Kondreddi" wrote:

> Have you tried using a 4 part name, as in the following?
> UPDATE LinkedServer...Customers
> SET CustomerName = 'Anders'
> WHERE CustomerID = 'ALFKI'
> --
> HTH,
> Vyas, MVP (SQL Server)
> SQL Server Articles and Code Samples @. http://vyaskn.tripod.com/
>
> "JLFleming" <JLFleming@.discussions.microsoft.com> wrote in message
> news:7E155BC0-BF89-485F-99E7-A116002CFACC@.microsoft.com...
> I am testing linking an unsecured Access database to my SQL 2000 server. I
> have been successfully been able to link the server and map a login to view
> the data.
> I am trying to figure out how to create an update statement in TSQL. I am
> using the Cutomer table in the linked NWind database. Can someone help with
> the syntax of translating the following syntax:
> UPDATE Cutsomers
> SET CustomerName = 'Anders'
> WHERE CustomerID = 'ALFKI'
> into a linked query.
> Thank you,
> JLFleming
>
>
|||Sorry fogot a poitn in that:
UPDATE [linkedServername]...Customers
[linkedservername].[database].[owner].[objectname]
"Jens Sü?meyer" wrote:
[vbcol=seagreen]
> UPDATE [linkedServername]..Customers
> SET Companyname = 'Anders'
> WHERE CustomerID = 'ALFKI'
>
> "JLFleming" wrote:

No comments:

Post a Comment