Results 1 to 5 of 5

Thread: Retrieve the detail from emp

  1. #1
    Geek_Guest
    Guest

    Retrieve the detail from emp

    Question asked by visitor siddharth

    Retrieve the detail from emp table with help of ename
    where ename may be in any case like (SCOTT,ScoTT, scott,scOtt)


  2. #2
    Expert Member
    Join Date
    Dec 2006
    Answers
    204

    Re: Retrieve the detail from emp

    select * from emp where lower(ename)='scott'

    This will do it.


  3. #3
    Contributing Member
    Join Date
    Apr 2007
    Answers
    46

    Re: Retrieve the detail from emp

    Hi,
    either of following:-

    select * from emp where lower(ename) like '%scott%';
    or

    select * from emp where upper(ename) like '%SCOTT%';

    Reeta


  4. #4
    Expert Member
    Join Date
    Sep 2006
    Answers
    130

    Re: Retrieve the detail from emp

    Hi,

    Using Case Manipulation functions (Upper, Lower, Initcap) will be more appropriate for this validation.

    *** Innila ***

  5. #5
    Moderator
    Join Date
    Jun 2007
    Answers
    2,074

    Re: Retrieve the detail from emp

    if u are sure the loist contains 'scott' in any case then go for

    select * from emp where lower(ename)='scott'

    else try to use like search


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
About us
Applying for a job can be a stressful and frustrating experience, especially for someone who has never done it before. Considering that you are competing for the position with a at least a dozen other applicants, it is imperative that you thoroughly prepare for the job interview, in order to stand a good chance of getting hired. That's where GeekInterview can help.
Interact