x

SQL openquery puzzle

Select From OpenQuery (Ftw003, 'Select From Mold');

Returns one row from a table that has 12837 records

more ▼

asked Jan 02, 2010 at 06:29 AM in Default

avatar image

Don 1
41 1 1 1

(comments are locked)
10|1200 characters needed characters left

2 answers: sort voted first

Something like this should hopefully do the trick?

SELECT *
FROM OPENROWSET(
    'SQLNCLI', 
    'Server=Ftw003;Trusted_Connection=yes;',
    'SELECT * FROM Mold'
);
more ▼

answered Feb 13, 2010 at 03:05 PM

avatar image

Ian Roke
1.7k 32 35 38

(comments are locked)
10|1200 characters needed characters left

Try using OPENROWSET instead. It could be something around the fact that OQ only returns one resultset, which could perhaps be getting confused depending on what your linked server is.

more ▼

answered Jan 02, 2010 at 10:46 AM

avatar image

Rob Farley
5.8k 16 21 28

(comments are locked)
10|1200 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

SQL Server Central

Need long-form SQL discussion? SQLserverCentral.com is the place.

Topics:

x129
x33

asked: Jan 02, 2010 at 06:29 AM

Seen: 2130 times

Last Updated: Jan 02, 2010 at 10:47 AM

Copyright 2016 Redgate Software. Privacy Policy