0

I am trying to roder a resultset based on Current date in Sybase ASE. I do not understand how to do that.

select x,date1 from abc where x>y order by date1> current_date

How to use the current date in orderby clause?

Danny Beckett
  • 20,529
  • 24
  • 107
  • 134
oortcloud_domicile
  • 840
  • 6
  • 21
  • 41
  • 2
    Order by current date doesn't make much sense. I think you want `ORDER BY dateColumn DESC` – T I Feb 13 '13 at 20:22
  • Are you trying to only see dates that are greater than the current date and the order by the date? If so that really belongs in the where clause – Joe Meyer Feb 13 '13 at 20:34

2 Answers2

1

not clear but i guess you want to do somemthing like below Query

  SELECT X,date1 from abc 
    where x>y 
    and date1 >current_Date --can use getdate() for current date 
    order by date1
0

My mistake, i got the requirements wrong. it makes sence to just sort in Desc or asc and then work with the data. sometimes I tend to forget basic things when i am too busy. Thank you all for the responses.

oortcloud_domicile
  • 840
  • 6
  • 21
  • 41