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 parameterized cursor in oracle?

577


In which language oracle has been developed?

646


What is meant by joins?

621


Can we save images in a database and if yes, how?

592


What is the difference between substr & instr functions?

597






I have a database backup file in .db (ext) form how to conver it into .dmp (ext.) for oracle database

1632


What do you understand by a database object?

588


How to delete all rows a table in oracle?

621


In Oracle Applications We are Using Sub Ledger Accounting. When we Transfer the Data all modules (AP,AR,CE,FA) to SLA We done Some customizations? What are They??

1364


What is bind variable in oracle 11g?

587


What are the data types in oracle?

550


Tab A A B ------ 1 A 2 B 3 C Tab B A B ----- 4 D 5 E 6 F Generate the value into B table from A table. Only table A has the value. Write the SQL query to get B table value.

1260


If any one has information regarding interview of NIC (National Informatics Centre),it would be of great help...

1731


How to convert characters to dates in oracle?

559


What is a proxy class?

557