Results 1 to 2 of 2
  1. #1
    Join Date
    Jan 2003
    Posts
    1

    Unanswered: Openquery with a sub-sql referening sqlserver table.

    Hello.
    I need to do a openquery to a linked server, and get record with id no in a sub select pointing to a table stored in SQLServer.
    I have something like this:



    select * into tmptable
    from openquery (select * from linkedserverTable where id not in (select distinct(id) from sqlserverTable))

    How to make sqserverTable not pointing to linked server, but sqlserver ?

    Rgds

    JC

  2. #2
    Join Date
    Dec 2002
    Location
    Czech Republic
    Posts
    249
    select *
    into tmptable
    from openquery (linkedserver,'select * from linkedserverTable')
    where id not in (select distinct id from sqlserverTable)

Posting Permissions

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