• Mike Levan (12/17/2007)


    When i do the following query

    select fromdate from emp where fromdate>'2/16/2007' (here fromdate is varchar)

    I get the follwing result set

    3/18/2004

    9/28/2004

    2/19/2004

    5/24/2006

    9/29/2004

    5/10/2001

    9/13/2001

    6/30/2006

    8/25/2000

    7/18/2006

    5/01/2007

    8/02/2000

    4/25/2001

    8/17/2006

    9/27/2006

    but i need the dates greater than '2/16/2007' which is not doing

    when I tried for less than and equal to it works just fine but am unable to get greater han

    1 Always use proper DATETIME datatype to store dates

    2 Let the front end do the formation

    If you have no option to change the datatype of the column, create a new column with datetime datatype;update it from varchar column and use that datetime column for further manipulations. Otherwise you have to end with with lot of castings or convertions


    Madhivanan

    Failing to plan is Planning to fail