jayjaybigs
IS-IT--Management
I have a table (mytable) and here is the description
select person_id,
name,
job_type,
job_code,
job_comp,
desc
from mytable
where rownum < 5
I got the following.
3445, Joe Manny, janitor, a310, 310.00, kitchen filler.
5456, klay Gerry, driver, b456, 420.00, mail delievery.
2363, kevein Mah, forklift, f489, 790.00, wharehouse.
I am trying to do the following.
select person_code,
name,
(select (job_comp * 2) if job_type like 'driver' and job_code = b456) as "temporary_raise"
from mytable
Basically I want the third field (temporary_raise) in my result
to be based on the values in 5th, 3rd and 4th in the table.
Note that these fileds are different for all employees.
Thanks for your help
select person_id,
name,
job_type,
job_code,
job_comp,
desc
from mytable
where rownum < 5
I got the following.
3445, Joe Manny, janitor, a310, 310.00, kitchen filler.
5456, klay Gerry, driver, b456, 420.00, mail delievery.
2363, kevein Mah, forklift, f489, 790.00, wharehouse.
I am trying to do the following.
select person_code,
name,
(select (job_comp * 2) if job_type like 'driver' and job_code = b456) as "temporary_raise"
from mytable
Basically I want the third field (temporary_raise) in my result
to be based on the values in 5th, 3rd and 4th in the table.
Note that these fileds are different for all employees.
Thanks for your help