Distinct order by

  • select distinct ENTRY_DATE from CIRC.SUBS_TAG

    ORDER BY to_date( ENTRY_DATE, 'mm/dd/yyyy' )ASC

    I get "invalid sql statement error". I want the distinct entries in order. Thank you.

  • There's no "to_date" function in T-SQL. Oracle, yes. MS SQL, no.

    Is the ENTRY_DATE column a text data type (varchar/char/etc.) or a datetime data type?

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • I got it right its working. Thank you.

  • If its solved please update with the solution, it will be useful to others.

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply