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


Please Help Members By Posting Answers For Below Questions

What is a private synonym?

1075


Database is hung. Old and new user connections alike hang on impact. What do you do? Your SYS SQLPLUS session IS able to connect.

1664


Where are the settings stored for each instance in oracle?

619


master table and child table performances and comparisons in Oracle ?

1658


What are the arithmetic operations?

574






You have 4 instances running on the same UNIX box. How can you determine which shared memory and semaphores are associated with which instance?

1440


How do you increase the OS limitation for open files (LINUX and/or Solaris)?

1458


Which is better Oracle or MS SQL? Why?

3954


List out the difference between commit, rollback, and savepoint?

611


What is execute immediate in oracle?

541


Explain implicit cursor.

546


When system tablespace is created?

592


Explain the use of owner option in exp command.

561


1) WIll all the user get the DEFAULT profile, if their current profile got deleted at any point of time? 2) What are the Situation we need to MOVE the TABLE between T.spaces? 3) What is the use of MOVING the TABLE between SCHEMA'S? 4) What are the Table Clause, Segment Clause and the Datafile Clause which will override each other? 5) Explain SORT_AREA_SIZE of Tempfile to make UNIFORM SIZE

1573


How to define an anonymous block?

610