Showing posts with label sort. Show all posts
Showing posts with label sort. Show all posts

Friday, March 23, 2012

row size SQL 7

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
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
|||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...
>
>
|||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...[vbcol=seagreen]
> 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:
|||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...[vbcol=seagreen]
> 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:
|||> 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).

row size SQL 7

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

row size

Cannot sort a row of size 8174, which is greater than the allowable maximum of 8094.
More info, please. Table structure, sample data, query that produces the
error?
http://www.aspfaq.com/5006
http://www.aspfaq.com/
(Reverse address to reply.)
"GC" <GC@.discussions.microsoft.com> wrote in message
news:B437E20D-A6E1-485D-8C71-0188D73965DB@.microsoft.com...
> Cannot sort a row of size 8174, which is greater than the allowable
maximum of 8094.
sql

row size

Cannot sort a row of size 8174, which is greater than the allowable maximum
of 8094.More info, please. Table structure, sample data, query that produces the
error?
http://www.aspfaq.com/5006
http://www.aspfaq.com/
(Reverse address to reply.)
"GC" <GC@.discussions.microsoft.com> wrote in message
news:B437E20D-A6E1-485D-8C71-0188D73965DB@.microsoft.com...
> Cannot sort a row of size 8174, which is greater than the allowable
maximum of 8094.

Monday, March 12, 2012

ROW IN A SPESIFIC ORDER

I HAVE FOUR ROWS IN A TABLE & I WANT THEM TO APPEARS IN A SPESIFIC ORDER AND I DON'T WANT TO SORT THEM.
please help meCan you give more datails?
You don't want sort them by SQL sort by clause?
In what kind of order?|||Exp:
SQL Sort LIKE

ASAP

C.F.E.D

Others

Zama

And I want to Sort Like
C.F.E.D
ASAP
ZAMA
OTHERS|||

You'll have to add some additional column to your table, perhaps called SortOrder. Then assign values to it:

SortOrder Value

10 C.F.E.D
20 ASAP
30 ZAMA
40 OTHERS

Then you can ORDER BY SortOrder.

|||but i don't want to show SortOrder. What I have to do for hiding this colunm.

Another Question is that I want to show "pie chart " Data label with percantage and as well as the name of the states
Like

Newyork, Calefornia
(5%) (30%)