Hi all,
Can any one give answer for this question.
Suppose im having employee table with fields, eno, ename,
dept, address1, address2, address3.
In address field employee can fill only address1 or address2
or address3... at a time he can fill three address fields.
now i want all employee names who filled only one address
field.. Plz its urjent can any one give querry.. Thanks in
advance.
Answer Posted / jigar
Select ename from employee
where
to_char(nvl2(address1,'1','0')||nvl2(address2,'1','0')||nvl2(address3,'1','0'))
in ('100','010','001')
| Is This Answer Correct ? | 5 Yes | 0 No |
Post New Answer View All Answers
Why cursor variables are easier to use than cursors?
How to select an oracle system id (sid)?
How data locks are respected in oracle?
When do I need to use a semicolon vs a slash in oracle sql?
What are the major difference between truncate and delete?
Can we use oracle pl/sql block in core java? if so how? pls get back to me .....
What is a nvl function?
What is the order of defining local variables and sub procedures/functions?
What are the differences between interval year to month and interval day to second?
How do I use os authentication with weblogic jdriver for oracle and connection pools?
HI Friends Myself Manoj,i am from bengaluru.i have 1 yr of exp in PLSQL but not upto the mark..now attending interviews but m not able to clear even 1 round..i have attended 3 interviews till today.purpose of writing this query is,i want to know the intreview topics that interviewer going to ask frequently,mainly SCENARIO based questions.IF anybody have any PLSQL projects please give it to me,it will helps me alot.Thanks for your patience.
Explain the use of full option in exp command.
Difference between varchar and varchar2 data types?
How to shutdown your 10g xe server from command line?
Can a formula column be obtained through a select statement ?