For example, I have
Select ID, Name, Place
Into ##Temp_Table
From Table1
Select ID from ##Temp_Table
This returns a list of IDs roughly in no order at all
2,35,47,23,1,15 ... you get the point. If I add Order By ID then I get them in the correct ascending order.
Is there a way to make them ordered correctly BEFORE the insert into statement so that when I
Select ID from ##Temp_Table
I get the ascending order of IDs?
If I try
Select ID, Name, Place
Into ##Temp_Table
From Table1
Order By ID
Select ID from ##Temp_Table
I still get a jumbled mess.
Thanks!