views:

69

answers:

2

I have a table as follows,

A   A  
B   B1  
A   A1  
B   B  
A   A2  
B   B3  
A   A3  
B   B2  

My result set should be,

A   A  
A   A1  
A   A2  
A   A3  
B   B  
B   B1  
B   B2  
B   B3  

Note: A, A1 are all GUIDs.

I have tried quite a few tricks. Please help me solve this problem.

+2  A: 

Maybe I am missing something, but I figured this would be: ORDER BY Column1, Column2

Perhaps you could explain this further?

Kyle B.
A, A1 are all GUIDs
+5  A: 

I'm assuming that the spaces indicate separate columns.

select * from [Table] order by [column1], [column2] 

If each line is a string then doing an order by [column1] should be sufficient.

monksy
Yes, A, A1 are all GUIDs