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

Don 1 gravatar 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

Ian Roke gravatar image

Ian Roke
1.7k 30 33 34

(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

Rob Farley gravatar image

Rob Farley
5.7k 16 18 20

(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.

New code box

There's a new way to format code on the site - the red speech bubble logo will automatically format T-SQL for you. The original code box is still there for XML, etc. More details here.

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:

x110
x27

asked: Jan 02, 2010 at 06:29 AM

Seen: 1971 times

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