Geeks Talk

Prepare for your Next Interview


Welcome to the Geeks Talk forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact us.

Retrieve the detail from emp

This is a discussion on Retrieve the detail from emp within the Oracle forums, part of the Databases category; 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)...

Go Back   Geeks Talk > Databases > Oracle
Register Blogs FAQ Tag Cloud Calendar Mark Forums Read

Oracle Oracle 9i & Oracle 10g Knowledge Base Learn and Share Oracle Technology related articles, white papers, tutorials / study materials, example codes, FAQ's, Tips and Tricks.

Reply

 

LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 04-04-2007
Expert Member
 
Join Date: Feb 2007
Posts: 1,279
Thanks: 0
Thanked 192 Times in 154 Posts
Geek_Guest has a spectacular aura aboutGeek_Guest has a spectacular aura aboutGeek_Guest has a spectacular aura about
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)
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 04-05-2007
Expert Member
 
Join Date: Dec 2006
Location: Chennai
Posts: 203
Thanks: 2
Thanked 17 Times in 15 Posts
Barbie is on a distinguished road
Re: Retrieve the detail from emp

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

This will do it.
Reply With Quote
  #3 (permalink)  
Old 05-10-2007
Contributing Member
 
Join Date: Apr 2007
Location: bangalore
Posts: 46
Thanks: 0
Thanked 9 Times in 9 Posts
reetasharma108 is on a distinguished road
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
Reply With Quote
  #4 (permalink)  
Old 05-24-2007
Expert Member
 
Join Date: Sep 2006
Location: India
Posts: 131
Thanks: 1
Thanked 21 Times in 20 Posts
Innila is on a distinguished road
Re: Retrieve the detail from emp

Hi,

Using Case Manipulation functions (Upper, Lower, Initcap) will be more appropriate for this validation.
__________________
*** Innila ***
Reply With Quote
  #5 (permalink)  
Old 07-12-2007
Moderator
 
Join Date: Jun 2007
Location: Bangalore,India
Posts: 1,853
Thanks: 9
Thanked 168 Times in 142 Posts
debasisdas has a spectacular aura aboutdebasisdas has a spectacular aura about
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
Reply With Quote
Reply

  Geeks Talk > Databases > Oracle

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads

Thread Thread Starter Forum Replies Last Post
Retrieve data from emp table Sampurna SQL 4 08-13-2008 08:07 AM
Can you help me prepare a detail resume? Geek_Guest Resume Help 1 06-28-2007 04:36 PM
Please give me detail about CDAC exam Geek_Guest Career Advice 0 04-03-2007 11:04 AM
Help me retrieve my password joel MY SQL 1 12-19-2006 02:53 AM
Retrieve a pdf document from database Lokesh M Database General 5 12-18-2006 08:44 AM


All times are GMT -4. The time now is 09:21 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.3.1
Copyright © 2009 GeekInterview.com. All Rights Reserved