[thelist] SQL Union and order by problem

r937 rudy at r937.com
Thu Oct 18 21:46:01 CDT 2007


okay, i think i understand (maybe)

try this query --


     SELECT a,b,c    
          , case when DATEDIFF(day, b ,getdate()) >= 3
                 then 0
                 else 1 
             end          as which_group
     order 
         by which group asc
          , DATEDIFF(day, b ,getdate()) 

rudy
http://r937.com/




More information about the thelist mailing list