Unexpected Remote Query Results

  •  Why does:

    Select count(*) from linked.server.table

    Give me what I'd expect (big number), but:

    Select count(*) from (Select top 10 * from linked.server.table) t

    Give me the same result (I expected 10 or less)



    PeteK
    I have CDO. It's like OCD but all the letters are in alphabetical order... as they should be.

  • I did the same experiment.

    The first one I got a big number.

    The second one I got 10.

     

  • Loner,

    Sorry, my bad I should have said fully-qualified remote table name instead of Linked Server table name

    Use Server.Database.User.Table (a four part name) for the test instead of a Linked Server (OpenQuery(...) rowset provider) query. I've gotten responses from others (on the TSQL board and other sites) saying that they experienced the same results I did.

    I solved my problem by using the OPENQUERY(...) rowset provider.



    PeteK
    I have CDO. It's like OCD but all the letters are in alphabetical order... as they should be.

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply