home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.databases.ms-sqlserver      Notorious Rube Goldberg contraption      19,505 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 17,730 of 19,505   
   m to All   
   multiple column sort   
   07 Jan 10 13:52:38   
   
   From: miroslavsi@gmail.com   
      
   Hello,   
      
   I need to provide sorting ability across multiple column.   
      
   Data which would be sorted are retrieved with stored procedure.   
      
   I have two solutions:   
      
   1. if statement   
   depending of sort type I must create diferent select statement   
      
   in case many columns there would be so many variations (also, there must be   
   considered sort direction ASC or DESC what increase variations double)   
      
   2. dynamic sql   
      
   Is there any additional way, which one is better?   
      
   Please advice,   
      
   Best regards   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca