Strange behaviour in record ordering
- From: "Jason Speight" <jasey9@xxxxxxxxx>
- Date: Thu, 19 Jul 2007 16:49:28 +0100
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
.
- Follow-Ups:
- Re: Strange behaviour in record ordering
- From: gregbanner
- Re: Strange behaviour in record ordering
- Prev by Date: Re: TSQL-Accmulations
- Next by Date: Re: Strange behaviour in record ordering
- Previous by thread: String Error SQL 2005
- Next by thread: Re: Strange behaviour in record ordering
- Index(es):
Relevant Pages
|
Loading