Hello,
I have wrote a select stmt to return data in our sql 7 db as we are
decomissiong it but getting error:
"Cannot sort a row of size 8262, which is greater than the allowable maximum
of 8094."
help
thxWell, the error message seems pretty straightforward to me, what is your
ORDER BY clause and what are the data types of the columns mentioned in it?
"stoney" <stoney@.discussions.microsoft.com> wrote in message
news:43E0BE09-A85A-4C09-9747-C7F6F1267B2A@.microsoft.com...
> Hello,
> I have wrote a select stmt to return data in our sql 7 db as we are
> decomissiong it but getting error:
> "Cannot sort a row of size 8262, which is greater than the allowable
> maximum
> of 8094."
> help
> thx|||yes I know the error is straitforward, is there a way around it? the column
in question is varchar 8000
"Aaron Bertrand [SQL Server MVP]" wrote:
> Well, the error message seems pretty straightforward to me, what is your
> ORDER BY clause and what are the data types of the columns mentioned in it?
>
> "stoney" <stoney@.discussions.microsoft.com> wrote in message
> news:43E0BE09-A85A-4C09-9747-C7F6F1267B2A@.microsoft.com...
> > Hello,
> >
> > I have wrote a select stmt to return data in our sql 7 db as we are
> > decomissiong it but getting error:
> > "Cannot sort a row of size 8262, which is greater than the allowable
> > maximum
> > of 8094."
> >
> > help
> >
> > thx
>
>|||You can try the ROBUST PLAN hint. It isn't guaranteed to work, though, depending on what it is you
are doing.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"stoney" <stoney@.discussions.microsoft.com> wrote in message
news:74E17ACD-2216-4540-BB84-04DDE2C0BEE3@.microsoft.com...
> yes I know the error is straitforward, is there a way around it? the column
> in question is varchar 8000
> "Aaron Bertrand [SQL Server MVP]" wrote:
>> Well, the error message seems pretty straightforward to me, what is your
>> ORDER BY clause and what are the data types of the columns mentioned in it?
>>
>> "stoney" <stoney@.discussions.microsoft.com> wrote in message
>> news:43E0BE09-A85A-4C09-9747-C7F6F1267B2A@.microsoft.com...
>> > Hello,
>> >
>> > I have wrote a select stmt to return data in our sql 7 db as we are
>> > decomissiong it but getting error:
>> > "Cannot sort a row of size 8262, which is greater than the allowable
>> > maximum
>> > of 8094."
>> >
>> > help
>> >
>> > thx
>>|||How about ORDER BY LEFT(YourCol,8000)
--
Andrew J. Kelly SQL MVP
Solid Quality Mentors
"stoney" <stoney@.discussions.microsoft.com> wrote in message
news:74E17ACD-2216-4540-BB84-04DDE2C0BEE3@.microsoft.com...
> yes I know the error is straitforward, is there a way around it? the
> column
> in question is varchar 8000
> "Aaron Bertrand [SQL Server MVP]" wrote:
>> Well, the error message seems pretty straightforward to me, what is your
>> ORDER BY clause and what are the data types of the columns mentioned in
>> it?
>>
>> "stoney" <stoney@.discussions.microsoft.com> wrote in message
>> news:43E0BE09-A85A-4C09-9747-C7F6F1267B2A@.microsoft.com...
>> > Hello,
>> >
>> > I have wrote a select stmt to return data in our sql 7 db as we are
>> > decomissiong it but getting error:
>> > "Cannot sort a row of size 8262, which is greater than the allowable
>> > maximum
>> > of 8094."
>> >
>> > help
>> >
>> > thx
>>|||> How about ORDER BY LEFT(YourCol,8000)
Unless the varchar(8000) values are all very similar, you could probably
achieve very similar results with simply
ORDER BY LEFT(YourCol, 32)
I am assuming there are other columns in the ORDER BY list, because of the
number reported in the error message (8262).
No comments:
Post a Comment