#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2011
    Posts
    1
    Rep Power
    0

    Common Query for both oracle and mysql.


    Select Empid Empname From Employee Where Emclass Is Not Null And Empclass <>' ' And Empclass <>'';

    Above Query Run Well For Mysql.but Not For Oracle Because Oracle Does Not Support Empty String.

    But I Need Common Query For Both Oracle And Mysql With All The Three Above Condition.
    Please Help Me
  2. #2
  3. Humble Learner
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2007
    Location
    Bangalore, India
    Posts
    280
    Rep Power
    120
    Originally Posted by mohdshahid
    Oracle Does Not Support Empty String.
    Your understanding is wrong regarding how oracle handles Empty String.

    Try this
    Code:
    Select Empid, Empname From Employee Where trim(Emclass) Is Not Null;
    will work in both oracle and mysql.

IMN logo majestic logo threadwatch logo seochat tools logo