Need help on query

  • miss.delinda

    SSCommitted

    Points: 1616

    In SQL Server below statement work fine,

    select *

    from t1 where maintdte != (select MAX(maintdte) from t1)

    How

    select *

    from t1 where maintdte != (select MAX(maintdte) from t1) looks like in SQLCE

    ?

    I'm stuck

  • Mayank Parmar

    Ten Centuries

    Points: 1019

    Sorry for being late !!!

    For SQLCE, you can use either Exists or In operator:

    select *

    from t1 where maintdte not in (select MAX(maintdte) from t1)

    Regards,

    Mayank Parmar

    --------------------------------------------------------------------------------
    Mayank Parmar
    Software Engineer

    Clarion Technologies
    SEI CMMI Level 3 Company

    8th Floor, 803, GNFC info Tower,
    SG Highway, Ahmedabad - 380 054,
    Gujarat, India.
    www.clariontechnologies.co.in

    Email: mayank.parmar@clariontechnologies.co.in
    MSN : mayank.parmar@clariontechnologies.co.in
    Mobile: +91 9727748789
    --------------------------------------------------------------------------------

  • Jeff Moden

    SSC Guru

    Points: 993884

    Heh... "CE" must stand for "Crippled Edition". 😛

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a row... think, instead, of what you want to do to a column.
    "If you think its expensive to hire a professional to do the job, wait until you hire an amateur."--Red Adair
    "Change is inevitable... change for the better is not."
    When you put the right degree of spin on it, the number 3|8 is also a glyph that describes the nature of a DBAs job. 😉

    Helpful Links:
    How to post code problems

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

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