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
 SQL Server Development (2000)
 Error when i order by on Varchar

Author  Topic 

shan
Yak Posting Veteran

84 Posts

Posted - 2007-03-15 : 12:36:43
I am getting the following error when i try to run a the select on a view statement with Order by column on 2 id (int) fields and a Varchar(255), I am getting the following error message

He gets this error message - Msg 701, Level 17, State 1, There is insufficient system memory to run this query.

The query works fine if i remove off the Varchar from the Order by, I am not sure how to fix this, Pls help me finding the reason for this and help me fixing this.

Thanks
Shan

blindman
Master Smack Fu Yak Hacker

2365 Posts

Posted - 2007-03-15 : 12:45:37
Start by posting the query.

e4 d5 xd5 Nf6
Go to Top of Page

shan
Yak Posting Veteran

84 Posts

Posted - 2007-03-15 : 12:52:46
Here it is

SELECT ProductCategory,*
FROM ProposalLineValues
WHERE
ProposalID = 86094
AND
LineType IN ('S', 'P', 'E', 'EP', 'U')
ORDER BY
SortOrder,
QuoteLineID,
ProductCategory
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2007-03-15 : 13:44:35
So this is a VIEW?
ProposalLineValues

Do the view definition already include another ORDER BY?


Peter Larsson
Helsingborg, Sweden
Go to Top of Page

shan
Yak Posting Veteran

84 Posts

Posted - 2007-03-15 : 13:47:03
No View does not have order by...
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2007-03-15 : 14:00:16
You told us
quote:
Originally posted by shan

I am getting the following error when i try to run a the select on a view statement



Peter Larsson
Helsingborg, Sweden
Go to Top of Page
   

- Advertisement -