View previous topic :: View next topic
|
Author |
Message |
kalinga
New User
Joined: 25 May 2005 Posts: 4 Location: chennai,india
|
|
|
|
hi,
My query goes like this,
I have a table say payroll_table, in that the queries i can tell are emp_id, sal_emp, Loc_emp.
now my query is i gave 4 inputs like emp_id's 100,200,998,999.
now i want to display the emp_id's which is not existing in that table with respect to what i given as input.
plz help me i struck up here.
kalinga |
|
Back to top |
|
|
vasanthanc
New User
Joined: 01 Apr 2005 Posts: 58
|
|
|
|
To display emp_id s which are not in the table, you need to have a master table which has all the emp_ids, then you can use minus query to get the result.
select emp_id from emp_mas MINUS Select emp_id from payroll_table |
|
Back to top |
|
|
parikshit123
Active User
Joined: 01 Jul 2005 Posts: 269 Location: India
|
|
|
|
well,
select * from payroll_table
where emp_id not in (100,200,998,999) ;
Please let me know if this query fails
Thanks,
Parikshit. |
|
Back to top |
|
|
|