Query to fetch the salary and other element entries from HCM. Original query owner to a friend of mine.
SELECT DISTINCT
prg.assignment_number,
prg.assignment_id,
pet.base_element_name element_name,
pee.entry_type entry_type,
pee.effective_start_date entry_start_date,
pee.effective_end_date entry_end_date,
pee.multiple_entry_count multiple_entry_count,
pee.element_entry_id element_entry_id,
(
CASE
WHEN base_element_name = 'Hourly Paid' THEN
round(peev.screen_entry_value * 1820, 2)
ELSE
to_number(peev.screen_entry_value)
END
) screen_entry_value,
piv.base_name base_name,
pee.person_id person_id,
papf.person_number person_number
FROM
pay_rel_groups_dn prg,
pay_entry_usages peu,
pay_element_entries_f pee,
pay_element_entry_values_f peev,
pay_input_values_vl piv,
pay_element_types_vl pet,
per_all_people_f papf
WHERE
1 = 1
AND papf.person_id = pee.person_id
AND papf.person_number = 123456
--AND prg.assignment_number = 'E123456'
AND prg.payroll_relationship_id = peu.payroll_relationship_id
AND prg.relationship_group_id = peu.payroll_assignment_id
AND peu.element_entry_id = pee.element_entry_id
AND pee.element_entry_id = peev.element_entry_id
AND piv.input_value_id = peev.input_value_id
AND pee.element_type_id = pet.element_type_id
AND piv.base_name = 'Amount'
AND pet.base_element_name IN ( 'Basic Salary', 'Hourly Paid' )
AND trunc(pee.effective_start_date) BETWEEN trunc(piv.effective_start_date) AND trunc(piv.effective_end_date)
AND trunc(pee.effective_start_date) BETWEEN trunc(peev.effective_start_date) AND trunc(peev.effective_end_date)
AND trunc(pee.effective_start_date) BETWEEN trunc(pet.effective_start_date) AND trunc(pet.effective_end_date)
AND trunc(sysdate) BETWEEN trunc(papf.effective_start_date) AND trunc(papf.effective_end_date)
Tuesday, 18 January 2022
Wednesday, 12 January 2022
OIC HealthCheck URL
I found the following URL randomly when OIC timedout on me which was able to provide the status of OIC. This needed me to login into the OIC service.
https://*********/ic/integration/home/ping.json
https://*********/ic/integration/home/ping.json
The result is as per below -
{"status": "ok"}
Monday, 10 January 2022
XML to XSD convertor
For OIC Integrations we need to create XSD from the XML (reverse engineer) in various scenarios. The below site worked for me like a charm.
https://www.liquid-technologies.com/online-xml-to-xsd-converter
As part of the tags xs:sequence is used quite a lot which can cause issues if the elements are not in the exact order. I found using xs:all handy to avoid that issue.
https://www.liquid-technologies.com/online-xml-to-xsd-converter
As part of the tags xs:sequence is used quite a lot which can cause issues if the elements are not in the exact order. I found using xs:all handy to avoid that issue.
Wednesday, 5 January 2022
Delete duplicate from Oracle Database table
There are various scenarios where data gets duplicated in oracle database tables. Below query can be used to identify the duplicate data based on the unique key and remove the duplicated rows.
DELETE FROM target STG
WHERE ROWID IN ( SELECT rid
FROM (SELECT rowid rid,
row_number() over (partition by order_id order by rowid) rn
FROM target)
WHERE rn <> 1);
The order_id is the unique key used to identify the duplicates.
DELETE FROM target STG
WHERE ROWID IN ( SELECT rid
FROM (SELECT rowid rid,
row_number() over (partition by order_id order by rowid) rn
FROM target)
WHERE rn <> 1);
The order_id is the unique key used to identify the duplicates.
Subscribe to:
Posts (Atom)
Integrations Lead - Lessons learnt
Integrations have been my passion for a while but like anything tech there is no credit given when things go right but always heaps of pres...
-
For most outbound interfaces bursting to content server and then picking the file from UCM is the best approach for large extracts. Default...
-
While developing Cloud integrations I could not find a single place for all details like InterfaceID or jobdefinitionname or job name etc. ...
-
You can use valueset(Ex-ORG_LEVEL1) to use the query table functionality in Fast Formulas. Below is sample how you pass parameters(P_ORG_ID)...