Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> SQL Question

SQL Question

From: Adrian Ting <adrianting_at_post1.com>
Date: Tue, 16 Jan 2001 20:45:05 +0800
Message-ID: <941fbe$pic$1@dahlia.singnet.com.sg>

Hi SQL experts, have a SQL question for yer.

I have 2 tables -
EMPLOYEE : EmployeeID,DepartmentID, Name and
DEPARTMENT : DepartmentID, Description

Both DepartmentIDs are related.

I want to retrieve Employee Names with
EITHER
- Employee.DepartmentID = 'SALES'
OR
ALL Employees

In another word,
If no employee is found with the department 'SALES', I would want the whole list of Employees returned or else only those with department 'SALES' will be returned.

Is this possible ?

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.219 / Virus Database: 103 - Release Date: 12/5/00
Received on Tue Jan 16 2001 - 06:45:05 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US