dbTalk Databases Forums  

Strange behaviour in record ordering

microsoft.public.sqlserver.clients microsoft.public.sqlserver.clients


Discuss Strange behaviour in record ordering in the microsoft.public.sqlserver.clients forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Jason Speight
 
Posts: n/a

Default Strange behaviour in record ordering - 07-19-2007 , 10:49 AM






Hi,

Can anyone suggest what is going wrong here? I have created a stored
procedure in SQL2005 Express, which builds a temp table, messes with data a
bit, and returns this data. The order of the returned records is important.
This is the last line of the SP.

SELECT * FROM #TempTable WHERE [Priority]=@TopPriority order by Priority
asc, [triggerlevel] desc, [Discount] desc

This works fine when using Server Management Studio - returning the records
in the correct order.

However, when I try call this Stored procedure from within VB.NET using
executereader to fill a dataset, the records come through in a different
order. (i.e. Trigger level is sorted ASCENDING).

Any suggestions - even if it is another newsgroup to send this problem to?
This is really beginning to frustrate me?

Thanks,

Jason



Reply With Quote
  #2  
Old   
gregbanner@myway.com
 
Posts: n/a

Default Re: Strange behaviour in record ordering - 07-20-2007 , 03:08 AM






Have a look at

www.newsql.com or

http://www.newsql.com or

worldwideweb.newsql.com

Good luck

Greg


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.