How To add postion specific email address to this query in oracle hrms

Hi friends,
I'm using the below query to send an email to the supervisor,employee and the HR manager
I was able to add the first two mail address..
for the third one,I mean HR manager... how do I get the email address
I want to add the email address of the position --(from per_positions-->name--'HR-Manager' )
I want to add the person's email address who is holding this position...
can some one help me with this please
SELECT paa.person_id, papf.full_name, papf.email_address, paa.date_end,
paa.date_start, paaf.supervisor_id, papf2.email_address
FROM per_absence_attendances paa,
per_all_people_f papf,
per_all_assignments_f paaf,
per_all_people_f papf2
WHERE paa.date_end = TRUNC (:p_date)
AND paa.business_group_id = :p_buss_id
AND papf.person_id = paa.person_id
AND TRUNC (:p_date) BETWEEN papf.effective_start_date
AND papf.effective_end_date
AND TRUNC (:p_date) BETWEEN paaf.effective_start_date
AND paaf.effective_end_date
AND paaf.assignment_type = 'E'
AND paaf.person_id = paa.person_id
AND paaf.supervisor_id = papf2.person_id
AND TRUNC (:p_date) BETWEEN papf2.effective_start_date
AND papf2.effective_end_date

What about this:
SELECT det.person_id
,det.full_name
,det.email_address
,det.date_end
,det.date_start
,det.supervisor_id
,det.mgr_email_address
,det.hr_person_id
,hrper.email_address hr_person_email
FROM (
SELECT paa.person_id, papf.full_name, papf.email_address, paa.date_end,
paa.date_start, paaf.supervisor_id, papf2.email_address mgr_email_address
,(SELECT paafhr.person_id
FROM per_all_people_f papfhr
,per_all_assignments_f paafhr
,hr_all_positions_f pos
WHERE papfhr.person_id = paafhr.person_id
AND nvl(papfhr.current_employee_flag, 'N') = 'Y'
AND paafhr.assignment_type = 'E'
AND paafhr.primary_flag = 'Y'
AND paafhr.position_id = pos.position_id
AND pos.name = 'HR-Manager'
AND trunc(:p_date) BETWEEN
papfhr.effective_start_date and papfhr.effective_end_date
AND trunc(:p_date) BETWEEN
paafhr.effective_start_date and paafhr.effective_end_date
AND trunc(:p_date) BETWEEN
pos.effective_start_date and pos.effective_end_date) hr_person_id
FROM per_absence_attendances paa,
per_all_people_f papf,
per_all_assignments_f paaf,
per_all_people_f papf2
WHERE paa.date_end = TRUNC (:p_date)
AND paa.business_group_id = :p_buss_id
AND papf.person_id = paa.person_id
AND TRUNC (:p_date) BETWEEN papf.effective_start_date
AND papf.effective_end_date
AND TRUNC (:p_date) BETWEEN paaf.effective_start_date
AND paaf.effective_end_date
AND paaf.assignment_type = 'E'
AND paaf.person_id = paa.person_id
AND paaf.supervisor_id = papf2.person_id
AND TRUNC (:p_date) BETWEEN papf2.effective_start_date
AND papf2.effective_end_date) det
,per_all_people_f hrper
WHERE hrper.person_id = hr_person_id
AND trunc(:p_date) BETWEEN
hrper.effective_start_date AND hrper.effective_end_date;

Similar Messages

  • How to whitelist a specific email address

    We are trying out an ironport C350. I am looking for a way to whitelist a specific email address ex. [email protected] The whitlist appears to onlyl let you add a whole domain or i.p. range and not a specific address. Is there a way to do this or would I need to build some kind of incomming content filter by sender name?

    A Content Filter would be the easiest but it is processed after the SBRS check.. Remember you can have a one content filter with multiple checks just make sure you use OR and not AND.
    So if you want to make sure a specific email is not spammed check you would need to create a Message Filter (regX expression) but then every single inbound email would be checked againest this filter.
    So the best way might be to create a whole new policy and place it before your normal or default policy. Have the policy only apply for sender = [email protected] You can turn off the spam check for this policy.

  • How do i change the email address for this iCloud account

    I have just set up my new iMac.  When asked for an email address, I set up a new one instead of using the email address used for my icloud used in my ipad.  How do I apply the old email address to icloud on the imac so that my calendars and email synchronise on all machines?

    Sign out in System Preferences>iCloud then sign in with the ID used on your iPad.

  • How do I block specific email addresses?

    I am receiving spam that is offensive and unwanted. I want to block the sender's address.

    Firefox doesn't do email, it's strictly a web browser.
    If you are using Firefox to access your mail, you are using "web-mail". You need to seek support from your service provider or a forum for that service.
    If your problem is with Mozilla Thunderbird, let us know and we can move this thread to the Thunderbird queue. This question currently is in the Firefox queue for answers.

  • Can anyone give me step by step instructions on how to add my school email address to mail?

    Thank you to all who respond.

    Sorry I goofed.
    In Safari on your iPhone there is a bookmark for the iPhone Users Guide. Load it up! Look at the chapter on Mail > Setting up Accounts.
    You'll need your Mail Passwprd, and the incoming and outgoing mail servers. These are obtained from the Information Technologies person at your school.

  • How can I remove an email address from one apple account and associate it with another?

    I created an appleID account to use with the mac AppStore without realising i previously had an appleID account from my first iPod touch.
    Now with OSX 10.8 I want to use the email address from the old account with the new account for Messages.app without having to manage 2 logins.
    I've followed the steps found on the support page http://support.apple.com/kb/HE68 under the section "How to add an additional email address that is already associated with another Apple ID" but each time I attempt to add the removed email address from the new account to the old account the input box shows the error: Email address is already verified for another Apple ID.
    Has anyone else experienced this problem and found a solution?

    Click here and request assistance.
    (80443)

  • I installed Mountain Lion so that I could sync my notes with my iPhone that already syncs notes with a specific email address I use for school, but during the install it automatically set up Notes to sync w the wrong email addy. How can I fix it?

    I installed Mountain Lion so that I could sync my notes with my iPhone that already syncs notes with a specific email address I use for school, but during the install it automatically set up Notes to sync w the wrong email addy. It looked in Mail, which had 5 email accounts set up in it, and for some reason picked the only one that I no longer use because it is for a school that I no longer attend. How can I fix it so that it syncs with the correct email account for notes and calendar? There don't seem to be any settings available other than to check if you want to use the basic features. It also said during the set up that it was setting up 'find my mac' but if I look on the iCloud website there is nothing showing there for finding my mac.
    At this point I feel like I wasted my money paying for this supposed upgrade. I got nothing for it but frustration. It even automatically set my security settings to allow only downloads from the Mac store so the first time I went to download something I had to stop what I was doing and go correct settings first. I feel like there should be a security setting to block downloads from the Mac store so I don't accidentally end up clicking the wrong thing and being charged.

    iCloud isn't syncing them on your phone.  You simply added the email account to your phone and enabled calendar and notes syncing with the email provider, and the calendar and notes appear in the calendar and notes apps on your phone.  You can do this with Gmail, Yahoo and other IMAP account.  iCloud email is just another IMAP account, but syncs notes with Apple's iCloud server just as Gmail syncs notes and calendars with Google's server.
    iCloud didnt' set up a non-iCloud account on your Mac.  When you check Mail in System Preferences>iCloud, it only creates an iCloud email account.  You can also add other email accounts to your Mac by going to System Preferences>Mail,Contacts,Calendars and clicking on the "+" sign on the bottom of the left sidebar.  If you added these other email accounts to your Mac before you upgraded to Mountain Lion, these were simply maintained on your Mac after you upgraded.

  • How can I get responses to return to a specific email address?

    How do I get all my for responses to return to a specific email address? Does the Acrobat user need to be logged in with this email or is there an option for this?
    Any help would be appreciated!

    Looks to me like the Distribute Forms feature in Acrobat taps into the email address you have specified in Acrobat as your identity; that's where it gets the mailto: address associated with the submit button in the document message bar. 
    Furthermore, if you create a form in LiveCycle the distribute process still seems to tap into Acrobat.  Just for grins you can open the distributed form in LiveCycle (better make and open a copy so you don't break the Reader extended usage rights), go & look in the object palette at the submit address property of your email submit button and it will be blank.  Surprise!  This data has migrated to one or more than one script at the document level.  And if your user then opens your LiveCycle-made form in Reader to complete and return, the submit button in the document bar corresponds to your identity email address in Acrobat.
    So I managed a quick but ugly workaround for an email submitted form by:
    Going into Acrobat:Edit/Preferences/Identity
    changing the email address in my identity to the desired return address
    distributing my form (can do either in LiveCycle or in Acrobat)
    putting my Identity email address back where it was afterwards.
    Good luck with all that.  And if anyone knows a more elegant method, do share!

  • HT5361 How can I add a second email address to my existing email account.  I can't find out how to accomplish that.

    I have an exisitng email address but I need to create a more professional sounding email address for work.  I can't figure out how to do this.  I'm using OS X 10.8.4
    Thanks!

    If you mean you want to add a second email address to the Mac Mail app:
    Open Mail > Preferences > Accounts > Click the plus sign and enter the information
    If you mean you want to add an alias to your iCloud mail account:
    Go to https://www.icloud.com > sign in > Mail > Click the Gear on top right > Preferences > Accounts > Add an Alias (on bottom left)

  • HT5577 How can I add a rescue email address now?

    I didn't add it at the first day I created my apple ID account. I want to change the password but can't remember the answer of 2 personal questions.
    So now I am supposes to add my rescue email address to receive new password. But how can I do that now?
    Thank you in advance.

    You would need to contact Apple Support to help with resetting security questions

  • HT5312 How can I add a rescue email address

    How do I add a rescue email address. Have been in passwords and security but not getting the
    option to add a rescue email,

    Welcome to the Apple Community.
    You need to answer your security questions to add a rescue address, if you don't know these.
    If you don't know these you should contact AppleCare who will initially try to assist you with a reset email or if unsuccessful will pass you to the security team to reset your security questions for you.
    If you are in a region that doesn't have international telephone support try contacting Apple through iTunes Store Support.

  • HT5312 how can i add a secure email address to my account if i don't know the answers to my security questions?

    how can i add a secure email address to my account if i don't know the answers to my security questions?

    I don't know either! I NEED HELP CAUSE I PUT MONEY INTO IT and they ask for my SECURITY QUESTION ANSWERS! When I try to change my security questions, which i forgot, they askk me for the ANSWERS TO MY SECURITY QUESTIONS!!!!!!!!!! I CAN"T DO IT IF I DON"T KNOW IT!

  • How can i add a rescue email address?

    How can i add a rescue email address? i have followed the information on the apple page but what they suggested didn't work/

    Do you remember the answers to your security questions ? If you do then log into your account on http://appleid.apple.com, select the Password And Security section of your account's page, answer the two questions that show and you can then add a rescue email address : http://support.apple.com/kb/HT5620
    If you don't remember your answers then you will have to contact Support in your country to get the questions reset.
    Contacting Apple about account security : http://support.apple.com/kb/HT5699
    When they've been reset you can then use the above steps to add a rescue email address for potential future use

  • I am trying to add my sons email address to our family apple id but it says that it already associated with another apple id. How can i find out what the apple id is and take his email address off that one?

    I am trying to add my sons email address to our family apple id but it says that it already associated with another apple id. How can i find out what the apple id is and take his email address off that one?

    You may be able to find your Apple ID at Look up your old and forgotten Apple ID

  • How do i add a rescue email address to an already existing apple id? The only option it gives me, under the manage my apple id category, is an alternate email. I am trying to make my alternate email address my rescue email address.

    How do i add a rescue email address to an already existing apple id? The only option it gives me, under the manage my apple id category, is an alternate email. I am trying to make my alternate email address my rescue email address. I am new to this community thing.

    Note that the rescue email address is not on the "Name, ID and Email Address" page -- you need to click on "Password and Security" on the left side. Even after you do that, it may or may not be available. As noted in the following it is only available if you have 3 security questions and are not using 2-step verification: Manage your Apple ID primary, rescue, alternate, and notification email addresses

Maybe you are looking for

  • ACE Total Connections Failed stats

    I have been monitoring connection stats on an ACE Module context (show stats connection). During recent load testing I observer that about 1/3 of all connections were failing and some timing out. How can I find out more details about the connections

  • Matrix report vertical line problem

    Development tool: Report Builder 11.1.2.2.0 (64-bit) on Windows 7 Solaris app server with the following software versions: Oracle Forms and Reports 11g 11.1.2.2.0 FMW is 11.1.1.7 WLS is 10.3.6.0.8 This is a report with a matrix.  The rows across have

  • Internet turns off every 10-15 minutes

    I have just moved into a 3 bedroom flat in the centre of Liverpool. All 3 of us share a BT Internet connection with a BTHub 2.0 However, every 10-15 minutes we all lose connection and have to reset the router, eventhough the router says everything is

  • Error in LDAP as Authentication

    Hi Experts , I have set up LDAP as a authentication source for our CUP . But when I try to logon with my network id & password I receive error "User credentials not valid." Also one more issue is the Userid field doesn't allow to enter more than 15 c

  • Passing entire SQL query to BIP server from Forms

    Hi I want to pass the entire SQL statement or only a WHERE clause dynamically constructed on Forms side to BI Publisher server at runtime. I have come across this article: http://blogs.oracle.com/BIDeveloper/2009/12/dynamic_sql_query_in_data_template