Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

different results with query and temp var table 1

Status
Not open for further replies.

chris123321

IS-IT--Management
Mar 13, 2007
139
US
When I run a query w/ an Order By clause the results are correct.

However, when I insert that same exact query in a temp var table and SELECT * FROM temp var table the results are not correctly ordered.

The code in its basic form is:
Code:
 INSERT INTO @DealInfo
   SELECT ...
   FROM ....
   WHERE ..
   ORDER BY DI.Orderkey

I can provide more info depending on what you need.

Thanks.
 
Thanks Denis.

I was able to resolve the issue with your previous reply in the post: thread183-1361784
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top