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.

Answers were Sorted based on User's Feedback



Hi all, Can any one give answer for this question. Suppose im having employee table with fields, e..

Answer / 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

Hi all, Can any one give answer for this question. Suppose im having employee table with fields, e..

Answer / nathan

WITH temp AS
(SELECT 1 ID, 'delhi' add1, 'mumbai' add2, 'guj' add3
FROM DUAL
UNION ALL
SELECT 2 ID, NULL add1, 'mumbai' add2, NULL add3
FROM DUAL
UNION ALL
SELECT 3 ID, 'delhi' add1, NULL add2, 'guj' add3
FROM DUAL)
SELECT *
FROM (SELECT ID, NVL (add1, 0) + NVL (add2, 0) + NVL
(add3, 0) address
FROM (SELECT ID, DECODE (add1, NULL, NULL, 1) add1,
DECODE (add2, NULL, NULL, 1) add2,
DECODE (add3, NULL, NULL, 1) add3
FROM temp))
WHERE address = 1;

Is This Answer Correct ?    0 Yes 1 No

Hi all, Can any one give answer for this question. Suppose im having employee table with fields, e..

Answer / babuli

select ename from emp where (address1 is not null or address2
is not null or address3 is not null) and
((address1 is null and address2 is null ) or (address1 is
null and address3 is null ) or (address2 is null and address3
is null ))

Is This Answer Correct ?    1 Yes 3 No

Hi all, Can any one give answer for this question. Suppose im having employee table with fields, e..

Answer / ajit

select *from addr1 where add1 is not null and add2 is null
and add3 is null or add1 is null and add2 is not null and
add3 is null or add1 is null and add2 is null
and add3 is not null

Is This Answer Correct ?    0 Yes 3 No

Post New Answer

More Oracle General Interview Questions

Hi Every One , What is the table Space in Oracle Database ? waiting for answere and thankyou

8 Answers  


Anyone have the Latest Oracle Dumbs?While u have please forard to narain1411@gmail.com

0 Answers  


What are steps required to ENTER DATA INTO DWH?

2 Answers  


Can you drop an index associated with a unique or primary key constraint?

0 Answers  


Explain cascading triggers.

0 Answers  






i must get table name, constraint type, constrain name with using concads "||" and it must be in string type, then with join processes i need code please help immidiately

1 Answers  


I have some query regarding Report generation from Oracle Apps "PO module". I have to generate a report where table columns are as below: Vendor_name Invoice No PO Number Item_Quantity Value of Goods Date of Shipping Name_of_the_transport Date_of_receipt_issued. Now my questions is :from which table/column I can get the information of "Name_of_the_transport" column. Thanks in advance.

0 Answers  


How to Remove the 3rd highest salary person record from table?

9 Answers   HCL, IBM,


How to assign data of the deleted row to variables?

0 Answers  


How can Oracle users be audited?

0 Answers   MCN Solutions,


what are Triggers?

7 Answers   TCS,


17. Display the order number and average item cost for each order.

1 Answers   Wipro,


Categories
  • Oracle General Interview Questions Oracle General (1789)
  • Oracle DBA (Database Administration) Interview Questions Oracle DBA (Database Administration) (261)
  • Oracle Call Interface (OCI) Interview Questions Oracle Call Interface (OCI) (10)
  • Oracle Architecture Interview Questions Oracle Architecture (90)
  • Oracle Security Interview Questions Oracle Security (38)
  • Oracle Forms Reports Interview Questions Oracle Forms Reports (510)
  • Oracle Data Integrator (ODI) Interview Questions Oracle Data Integrator (ODI) (120)
  • Oracle ETL Interview Questions Oracle ETL (15)
  • Oracle RAC Interview Questions Oracle RAC (93)
  • Oracle D2K Interview Questions Oracle D2K (72)
  • Oracle AllOther Interview Questions Oracle AllOther (241)