Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 OPENROWSET with more than 8000 char

Author  Topic 

Mathias
Posting Yak Master

119 Posts

Posted - 2005-09-30 : 08:14:24
Hi,
I need to send more than 8000 in a openrowset statement. I get an error. Is there a way to do it?
Thanks,
Mathias

Kristen
Test

22859 Posts

Posted - 2005-09-30 : 08:49:17
Something like this?

DECLARE @strSQL1 varchar(8000),
@strSQL2 varchar(8000)

SELECT @strSQL1 = 'SELECT * FROM OPENQUERY(MyServer, ''SELECT TOP 10 *',
@strSQL2 = ' FROM Northwind.dbo.Orders'')'

EXEC (@strSQL1 + @strSQL2)

Kristen
Go to Top of Page
   

- Advertisement -