Home All Groups Group Topic Archive Search About

Max lenght (8000) in string in OpenQuery

Author
13 Sep 2006 1:13 PM
Luigi
Hi all,
I have a OpenQuery function that in the Select statement the lenght of
it is above 8000 characters, and it get into error when I run the
query.
Is it possible to by-pass this problem?

Thanks a lot.

Author
13 Sep 2006 1:26 PM
Robinson
"Luigi" <ciu***@inwind.it> wrote in message
news:1158153193.968754.180720@i3g2000cwc.googlegroups.com...
> Hi all,
> I have a OpenQuery function that in the Select statement the lenght of
> it is above 8000 characters, and it get into error when I run the
> query.
> Is it possible to by-pass this problem?
>
> Thanks a lot.
>

You need to use an NTEXT field, along with all of it's limitations as the
largest NVARCHAR or VARCHAR is 8000 bytes (4000 characters for NVARCHAR).
Author
13 Sep 2006 1:34 PM
Luigi
Robinson ha scritto:
> You need to use an NTEXT field, along with all of it's limitations as the
> largest NVARCHAR or VARCHAR is 8000 bytes (4000 characters for NVARCHAR).

Yes, but my Select statement in inside the OpenQuery, not a variable
(an OpenQuery doesn't accept parameters).
Like this one:

SELECT * FROM OPENQUERY (XPDB,
''SELECT  BUTE0.FM_BOST.SOC_MASTER,
...................................
......................................
.................................
-- up 8000 characters
..........................")