Results 1 to 3 of 3

Thread: openquery help

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jul 2005
    Posts
    69

    openquery help

    I want to update the table on a linked server with data from a table on my server.How can I do this using openquery ? when I tried using openquery passing linked server , it does not recognise the database myDB as it is on my server.
    Any suggestions to accomplish the below statement using linked server....

    UPDATE
    LinkedDB.dbo.tVendorMMStest
    SET
    LinkedDB.dbo.tVendorMMStest.VendorName=myDB.dbo.tVendorMaster.VName,
    LinkedDB.dbo.tVendorMMStest.KeyDate= getdate()
    FROM
    myDB.dbo.tVendorMaster
    WHERE
    LinkedDB.dbo.tVendorMMStest .VendID= myDB.dbo.tVendorMaster.VendorNumber

  2. #2
    Addicted Member
    Join Date
    Oct 2006
    Location
    Chennai, India
    Posts
    198

    Re: openquery help

    First try checking the required permission for creating the link to the other database.

    If so, create the Database link, and then use that DBlink to access to the remote DB table.
    Regards
    Srinivasan Baskaran
    India

  3. #3
    Addicted Member
    Join Date
    Oct 2006
    Location
    Chennai, India
    Posts
    198

    Re: openquery help

    Regards
    Srinivasan Baskaran
    India

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width