Home » SQL & PL/SQL » SQL & PL/SQL » a select statemet question ??
a select statemet question ?? [message #189945] Mon, 28 August 2006 12:47 Go to next message
haitham
Messages: 60
Registered: February 2006
Member
i have the table emp contains empid and the table deptwork contains the empid and the deptid..
for each departement i want to retrieve the employees who dont work in it .
plz help..

[Updated on: Mon, 28 August 2006 12:50]

Report message to a moderator

Re: a select statemet question ?? [message #190331 is a reply to message #189945] Wed, 30 August 2006 04:20 Go to previous messageGo to next message
kimant
Messages: 201
Registered: August 2006
Location: Denmark
Senior Member
Hi

It sound to me like a cartesian join, where You then discard the rows where the employee does work in the department....

so instead of department_id = department_id do
department_id != department_id

Must be very expensive for a big company....

Or did I miss something?

Br
Kim
Re: a select statemet question ?? [message #190466 is a reply to message #189945] Wed, 30 August 2006 23:08 Go to previous message
umal
Messages: 1
Registered: August 2006
Junior Member
http://www.erasoftonline.com has some good articles/tutorials for beginners I think following URL will help you most.

http://www.erasoftonline.com/erasoftonline/modules/BestFreeSqlBooks/

http://www.erasoftonline.com/erasoftonline/modules/BestFreeOracleBooks/
Previous Topic: date datatype
Next Topic: how to view whatever privileges are given to users
Goto Forum:
  


Current Time: Fri Dec 09 15:28:21 CST 2016

Total time taken to generate the page: 0.21398 seconds