Decode of specific Employee Jobs

select decode(empno,(select 7369 from dual union select 7654 from dual union select 7762 from dual) ,'INVALID JOB',JOB)
from scott.emp
i cant hardcode the employee number.. but when for specific employees which is returned from sql statement i need to decode the Job.
Pls suggest,

SQL> select empno, ename, case when empno in (7369,7654,7762)
  2                            then 'INVALID JOB'
  3                            else JOB
  4                       end job
  5  from emp;
     EMPNO ENAME      JOB
      7369 SMITH      INVALID JOB
      7499 ALLEN      SALESMAN
      7521 WARD       SALESMAN
      7566 JONES      MANAGER
      7654 MARTIN     INVALID JOB
      7698 BLAKE      MANAGER
      7782 CLARK      MANAGER
      7788 SCOTT      ANALYST
      7839 KING       PRESIDENT
      7844 TURNER     SALESMAN
      7876 ADAMS      CLERK
      7900 JAMES      CLERK
      7902 FORD       ANALYST
      7934 MILLER     CLERK
14 rows selected.Max

Similar Messages

  • Cycle Count Entries Form not showing specific employee name in "Counted By" LOV List

    Cycle Count Entries Form not showing specific employee name in "Counted By" LOV List.But the Employee is active . Is there any setup for this activity?

    Hi,
    This is because the query is excluding the current site you are trying to modify since it is actually in the report.
    You can include in your query:
    or site_id = :Pxx_SITE_ID
    Where Pxx_SITE_ID is the item holding the site_id value and xx is your page number.
    Thank you,
    Erick

  • SM36/37: Specification "After Job" does not work for Daily "periodcity"

    I reviewed http://help.sap.com/saphelp_nw04/helpdata/en/20/2d513897110872e10000009b38f889/content.htm, which states what I am trying to do should work, but it does not.
    Here's the deal:
    1.  I have two jobs: "A" and "B".
    2.  "A" runs Daily.
    3.  I set-up job "B" to run "After job" "A" in my SM36 definition.
    Job "B" will run the next day, but never runs again after that even though job "A" continues to run "Daily" as it should.
    Further info:
    1.  We have "Event-triggered" jobs that run fine, but the "After Job" designation doesn't seem to work ongoingly.
    2.  I can review both jobs "A" and "B" for any "Predecessor" or "Successor" jobs, and, the first jobs to run after the initial set-up DO reference each other (in other words, let's say I schedule job "B" to run "After job" "A" on Tuesday.  After Tuesday's run, Job "A" sees job "B" as it's "Successor" job and job "B" sees job "A" as it's "Predecessor" job), but the definition doesn't last into the next day ONLY FOR JOB "B" (as I mentioned, job "A" always runs fine).
    3.  I can't set the "periodcity" for job "B" because, once I flag it to run "After Job" "A", the "period" options disappear.
    4.  One final tidbit: the variant for job "B" has a "key date" specified so the date is dynamic for each day the job runs.  I can set up job "B" to run "Daily" with this variant and it runs fine, but I wanted it to run AFTER job "A" so it never runs if job "A" doesn't run.  (At this point, it's becoming a matter of principal!)
    Here's my question:
    Why won't job "B" continue to run "Daily" after job "A" (a "Daily" job) runs?
    Thanks in advance,
    Lara

    Please close this thread since you posted the same question here:
    [SM36/37: Specification "After Job" does not work for Daily "periodcity"|SM36/37: Specification "After Job" does not work for Daily "periodcity";

  • Changing supervisor name, changing the employee Job also

    Hi All,
    We are facing a problem in the Employee assignment.
    When we are changing employee supervisor details, employee job also getting changed to different job. Can any one having idea abt this change.
    Thanks and Regards,
    Joshna.

    Hi Avaneesh,
    There is no personalizations enabled for this Form. The changes are reflecting only for a particular group not for all the employees.
    We had implementated jobs only we don't implemented positions. Is any where we will link this group to effect this changes.
    Thanks
    Joshna.

  • FM to change Employee Job

    Hi does anyone know if there is a function module we can use to change the employee job assignment?
    I'm thinking of using the FM 'RH_RELATION_MAINTAIN' but the problem is how will I change the existing record?
    Will this create 2 job relationships for 1 employee?
    Thank you

    hi SVS,
    try to use these bapis
    BAPI_INB_DELIVERY_CHANGE 
    BAPI_OUTB_DELIVERY_CHANGE

  • How to get total number of plants, employees, jobs and respective tasks

    Hi Gurus,
    I have requirement where in I need to give client information about root object. Information being sought is on the total number of plants, employees, jobs and respective tasks performed by employees.
    Is there any standard report available to fetch this information? Or please let me know how to collect all this information?
    Thanks in Advance.
    Rupali

    Total number of employees S_AHR_61016369
    Jobs S_AHR_61016497
    Tasks S_AHR_61016522, S_AHR_61016523 & S_AHR_61016524

  • Immediate help required with decode statement in scheduling jobs

    Hi
    Iam trying to change a job that runs my procedure using dbms_job.. Here is the output I got.
    Can someone help me why this is giving me errors.
    <code>
    SQL> exec dbms_job.next_date(395,decode(sign(substr(to_char(sysdate,'dd/mm/yy hh24:mi'),10,2)-17),-1,'trunc(sysdate) +18.5/24',1,'trunc(sysdate)+1+6.5/24'));
    BEGIN dbms_job.next_date(395,decode(sign(substr(to_char(sysdate,'dd/mm/yy hh24:mi'),10,2)-17),-1,'trunc(sysdate) +18.5/24',1,'trunc(sysdate)+1+6.5/24')); END;
    ERROR at line 1:
    ORA-06550: line 1, column 30:
    PLS-00204: function or pseudo-column 'DECODE' may be used inside a SQL
    statement only
    ORA-06550: line 1, column 7:
    PL/SQL: Statement ignored
    </code>
    Thanks in advance

    A possible solution:
    declare
    v_next_varchar varchar2(30);
    v_next_date date;
    begin
    select decode(sign(substr(to_char(sysdate,'dd/mm/yy hh24:mi'),10,2)-17),
                              -1,'trunc(sysdate) +18.5/24',
                                 1,'trunc(sysdate) +1+6.5/24'
    into v_next_varchar
    from dual;
    execute immediate 'select ' || v_next_varchar || ' from dual ' into v_next_date;
    dbms_job.next_date(22, v_next_date);
    commit;
    end;Bye, Aron

  • How do I get to display employee job titles within a list?

    I want to create a list that will hold employee data. I have a requirement to auto populate a second column based on a previous entry in the first column. More details....if the end user enters in an employee name in the first column, I want to be able to
    display the selected employee's job title in the second column. Is there a way to do this without writing custom code in SharePoint? Is there a way to use a lookup column to display this information? If so, how?
    I really appreciate the help/ideas. Thanks.

    Hi,
    As I understand, you need to auto populate Job Title per an account name in person or group field.
    I'd suggest you use InfoPath rule to auto populate. If you need to get properties in User Profile, you can refer to the article below:
    http://blogs.technet.com/b/anneste/archive/2011/11/02/how-to-create-an-infopath-form-to-auto-populate-data-in-sharepoint-2010.aspx
    However, Job Title is not listed. We can use User Information List to get Job Title of user. By default, Job Title is not available in User Information List. Please go to User Profile Service Application > Manage User Properties > Job Title > Edit
    > Policy Settings, uncheck User can override and check Replicable.
    Then manually run timer jobs below:
    Now check User Information List via
    http://sitename/_catalogs/users/simple.aspx  > Edit page > edit web part > edit current view, see if Job Title is listed.
    If so, then we can use UIL list to get Job Title value per Account name.
    Regards,
    Rebecca Tu
    TechNet Community Support

  • How to view employees of "only a specific employee-group" from an org unit

    Dear All,
    I am working with authorization for  MSS , now there is following requirement ,
    There are 2 cheif positions in one orgunit , say as cheif-1 and cheif-2 , cheif-1 can view all employees exist in his organization unit ,including cheif-2 . But cheif-2 can see all those employees who belong to employee group non-management and reports to cheif -2  only.
    We have tried to restrict the chief 2 to view employee group of non-mgmt in object p_orgin but still he is able to view all employees of org unit in mss. Kindly let us know it is possible to strict chief-2 to view non-mgmt employees .. & how ?
    Kindly let me know the solution , as it is an urgent .
    Regards
    Sadia Kamal
    Edited by: Sadia Kamal on Oct 14, 2011 3:32 PM

    Dear  All,
    i used the structural authorization everything was working fine but cheif1 can view all his employees as well as cheif 2 ' employees but he can not view chief2 . any suggestion please let me know .
    Regards
    Sadia Kamal
    Edited by: Sadia Kamal on Oct 16, 2011 11:10 AM

  • Restrict user to see specific employee record

    How I can rsHow can I restricted a user to see the only those employee whose location_code(assignment form Location Code) like XX
    Edited by: user12879396 on Mar 11, 2012 6:24 AM

    Hi Dear,
    It shouldnt be much difficult. Just follow the below example steps:-
    step1. Navigate to HRMS Manager responsibility -->Security --> Profile
    Step2. Give the name and other details and select the tab "Custom Security"
    Step3. write code like below
    ASSIGNMENT.location_id in (select LOC.location_id
                             from hr_locations_all LOC
                             where LOC.location_code
                             in ('London','Paris'))
    Step4. Save your work and attach this security profile to the responsiblity where you want this restriction.
    Hope this helps.
    Thanks,
    Avinash

  • E-recruiting: Add a specific Employee Group like candidate

    Hello!
    A client have E-recruiting 6.0 and SAP ECC runs on the same instance.
    At the moment, the "Employee Group=Training" only see  the requisition of external candidates and the client requires that (in the future) the Employee Group "Training" see requisition of internal candidates.
    Which is the procedure to realise to include this Employee Group like internal candidate?
    Thanks,

    Hello Alicia,
    What do you mean by employee group? Is it an own role assignment to a particular group of employees?
    Regards
    Nicole

  • TMS Client Specific Job

    Dear Guru's
    I have a three system landscape DEV,QAS, & PRD. I have configured a consildation route to a target transport group Which passes requests to unit testing client in DEV and the integration testing client in QAS. The delivery route moves requests to two other clients in QAS and the production client.
    I want to automatically import requests to DEV Unit testing client and QAS integration client only. I managed to do the first one but if i scehdule a job for QAS it imports all requests into all clients in QAS even the one's on the delivery route??
    Can i configure a client specific TMS job..
    Thanks in advance

    Hi Mohamed,
    This is possible.
    Do one thing. Stop the job that is importing transports to QAS system.
    Now go to the STMS view for your QAS system. Click on column heading CLNT (Client) and use the filter option. You will get a pop up where you can give the client you want.
    Now reschedule the import job using the import all option as you must have done earlier.
    I hope this solves the issue. Please award points accordingly.
    Regards.
    >Ruchit.
    Message was edited by: Ruchit Khushu
    Message was edited by: Ruchit Khushu

  • Error after a scheduling a background job

    Hi all,
    I'm trying to schedule an interface program in background which reads data from application server and posts a document in Finance through a BAPI funtion module.But after scheduling the job in the immediate mode,its getting canceled showing the error
    "Could not ascertain code page"
    "Job cancelled after system exception ERROR_MESSAGE" in the job log.
    Please help me with this...
    thanks

    Hi ,
    To decode the reason behind job failure , use ST22 Tcode with Exception Name as ERROR_MESSAGE ( as that is what is given in the Job log )   and User - SAP Logon Id
    This would give the system dump log and tell you where exactly the job failed .
    Please note this applies for any background job and is not specific for your case .
    Do have a look at the dump in future ...
    Thanks

  • Steps required while moving employees from one organisational

    Can any one explain and write down steps required while moving employees from one organisational unit to other organisational unit.
    regards

    Hi ganesh,
    Firstly create the new position for the employee if it is not already existing.
    Then goto SPRO : Personnel Man. -> Pers. Adm-> Customizing procedures -> Actions -> Define infogroups -> infogroup.
    Only Copy 0001 is enough.
    Then Setup personnel actions with this infogroup.
    Then go to PA40 and execute this action for that specific employee.
    You will only need to change the position assignment, org unit, job, vs all come from position info.
    Regards,
    Dilek
    Edited by: Dilek Ersoz on Oct 14, 2008 9:41 AM

  • Print Job Progress

    Is there some way in OS X or via the CUPS web interface to see how much of a print job has been transferred to the printer? Even third party solutions that interface with CUPS is of interest of course. For example, displaying "Sent 4.3 MB of 170.7 MB to printer" or similar.
    Working with graphically heavy print jobs, it's valuable to be able to see an estimation of how long a specific print job has to go before it has transferred to the printer in full.
    Also, it seems Windows sends print jobs to the printer quicker than CUPS, any particular reason why? Same print jobs, same printer...

    The easiest way to cancel a print job would be by pressing the cancle button on the front panel.  This is the "X" button near the right side of the control panel, see pages 10 and 11 of the user manual here.
    Bob Headrick,  HP Expert
    I am not an employee of HP, I am a volunteer posting here on my own time.
    If your problem is solved please click the "Accept as Solution" button ------------V
    If my answer was helpful please click the "Thumbs Up" to say "Thank You"--V

Maybe you are looking for

  • Posting invoice in FB60

    Hi, I am new this finance module.I am working with tcode FB60. My questions are : 1. What is the doc type for NON PO invoice type . 2. Is there any other clear cut way so that i can find a NON PO invoice being created in FB60.? regards paveeee

  • P2 wonkiness with Leopard

    Up until (perhaps) the last OS update, our shop has not had issues importing P2 video on a MBP with Duel adapter with either FCP or Panasonic's P2 CMS software. Now, we can't seem to mount P2 cards on the same MBP (after reinstalling everything). The

  • Error Code -36 Connect to Microsoft Windows StorageServer 2003

    Hope someone can help me Each time i connect to our office server cifs://192.XXX.X.XX logging into the server as the administrator i can open our office documents and see the files.. but i cant move any files over to it comes up with error -36 The of

  • Sums up the last 4 weeks from the start date

    Hi all, Pls tell me how to find the give issue with example How to write queri in SQL sums up the last 4 weeks from the start date selected (meaning range of date 1st to 7th) (the 4 weeks should stop on the 31st). Thanks & Regards

  • Reinstall Final Cut Studio 7

    I'm running a MacPro, just upgraded to Yosemite when I had to replace my home hard drive.  I had to trash Final Cut Studio 7.  Can I reinstall it from the original DVD's?  Will it run on Yosemite? Thanks,  Robert