• Post category:BI Publisher
  • Post comments:0 Comments
  • Post last modified:November 30, 2021
  • Reading time:2 mins read
You are currently viewing SQL query to fetch Payslip and W-2 delivery preferences
SQL query to fetch Payslip and W-2 delivery preferences

In this article, we will try to fetch the Payslip and W-2 form delivery preferences setup by Users.

SQL Query:

select 
distinct doc_type.document_type, 
papf.person_number, 
pref.online_enabled, 
pref.paper_enabled,
pref.email_enabled 
from 
HR_DOCUMENT_DELIVERY_PREFS pref, 
HR_DOCUMENT_TYPES_TL doc_type, 
per_all_people_f papf
where 
pref.document_type_id = doc_type.document_type_id
and papf.person_id = pref.person_id
and doc_type.language = 'US'
and trunc(sysdate) between papf.effective_start_date and papf.effective_end_date

Sample data will look like:

image 7 - SQL query to fetch Payslip and W-2 delivery preferences
If you like the content, please follow us on LinkedInFacebook, and Twitter to get updated with the latest content.