Results 1 to 6 of 6
  1. #1
    Join Date
    Dec 2011
    Posts
    3

    Unanswered: Please find the equivalent query

    Select empid empname from employee where empclass is not null and empclass <> ' ' and empclass <>'';

    this query is perfectly run in mysql.

    But in oracle it return no records found.beacuse oracle does not support empty string.
    Please provide me the equivalent query for oracle.

  2. #2
    Join Date
    Apr 2008
    Location
    Iasi, Romania
    Posts
    561
    Provided Answers: 2
    empclass IS NOT NULL AND TRIM(empclass) IS NOT NULL
    Florin Aparaschivei
    DB2 9.7, 10.5 on Windows
    Iasi, Romania

  3. #3
    Join Date
    Dec 2011
    Posts
    3
    Thanks for your response aforin
    but i want common query for both oracle and mysql having all the three conditions.

  4. #4
    Join Date
    Apr 2008
    Location
    Iasi, Romania
    Posts
    561
    Provided Answers: 2
    Hm ... you want the same query to run in both MySQL and Oracle?
    Florin Aparaschivei
    DB2 9.7, 10.5 on Windows
    Iasi, Romania

  5. #5
    Join Date
    Dec 2011
    Posts
    3
    yes aflorin

  6. #6
    Join Date
    Apr 2008
    Location
    Iasi, Romania
    Posts
    561
    Provided Answers: 2
    I don't know mySQL - what exactly returns TRIM(empty_string) in mySQL?
    Florin Aparaschivei
    DB2 9.7, 10.5 on Windows
    Iasi, Romania

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •