Who's Online
0 registered (), 3 Guests and 1 Spider online.
Key: Admin, Global Mod, Mod
Recent Posts
French Localizations
by jmoyano
Today at 09:20 AM
How managers initiates SSHR request of employees
by Geoff Dixon
Today at 09:02 AM
FYI: P60s to be available in Self Service
by kp_rapolu
01/09/10 03:42 PM
SSHR Personalization requirement
by kp_rapolu
01/09/10 03:41 PM
Request for responsibility in ESS
by SBi
01/09/10 05:49 AM
Nominate for peers/subordinat for reward
by bcooper
31/08/10 07:46 PM
UK HCM Sig - 29th September
by andy.fisher
31/08/10 10:05 AM
Migration of terminated Employees
by SBi
31/08/10 10:02 AM
Worldwide Bank Details Validation
by SBi
27/08/10 02:33 PM
HTML pages popping up BEHIND Core Apps forms?
by Geoff Dixon
27/08/10 12:34 PM
Top Posters (30 Days)
SBi 28
bcooper 14
CT 12
PeterP 10
Geoff Dixon 8
Saqib Rahat 7
EBS_USER 6
kp_rapolu 5
delboy 5
MarinaH 3
(Views)Popular Topics
Family Pack K issues thread 8728
CREATE_GRADE api returns:PLS-00306: wrong number o 6046
Still trying to locate... 4588
Creating hr jobs ORA-20001: HR_289477_JOB_GROUP_ID 4356
Review of my Release 12 laptop 4212
Log-on problems for existing users 3526
Viewing Output of another user 3213
Family Pack K 3087
October UK-OUG? 3064
uploading bank branches to PAYROLL 2880
Topic Options
Rate This Topic
#1124 - 23/03/05 02:12 PM Janet & John do Date-track Queries
CT Offline
veteran
***

Registered: 11/03/05
Posts: 816
Loc: Back at Fort Apache, Gosport!
From the J&J archives of 07/04/2003:

Morning all

Here's a little anecdote primarily (but not exclusively) aimed at our non-HR/Payroll friends who may be called upon at some stage to go ferreting around for information on HR/Payroll/Benefits DateTracked tables. Apologies to anyone who thinks I'm stating the bl**din' obvious but if it helps only one person to avoid the problem then I would deem it a worthwhile excercise

Last week whilst on site at a large council in the Cheshire area doing some payroll-related work I was accosted by a rather excitable council employee who took great pains to explain to me that Oracle HR has a very serious bug in it. (A bug? In Oracle HR? Shome mishtake shurely!!!)

Apparently as well as HR and Payroll they also have Oracle Purchasing and Oracle Projects. This gentleman being of the 'Projects' persuasion was being informed by Projects that certain submitted timecards were not valid as the system could find no supervisor to approve them. He had done the usual TAR-raising activity whereupon it was found that the rejected timecards were all for employees whose supervisors had a change to their assignment record effective the day after the timecard submission date. The reason is quite simple but may reveal something of a misconception on the part of the Oracle Projects Development Team where DateTrack is concerned.

Basically the bit of code trying to get the supervisor included this:

Select <stuff>
FROM per_all_assignments_f
WHERE assignment_id = <whatever>
AND sysdate BETWEEN effective_start_date
AND effective_end_date
AND ...

All very easy. But wait!! It's not finding a row where there's a change starting tomorrow. Why not?

Well the thing about DateTrack is that there is never a time element involved (otherwise it would be called 'TimeTrack' and quite frankly that concept frightens me). It follows that the smallest unit of date effective change is 1 day. If you think of a date-effective change taking place from tomorrow in terms of just a date then in the table it might look like this:

ID Effective Start Date Effective End Date
123 01-JAN-2003 07-APR-2003
123 08-APR-2003 31-DEC-4712

The basic rule of date effective changes is being obeyed in that we have a contiguous span of time ie no missing days.

If however you look at the dates in terms of a date and time then it would look like this:
ID Effective Start Date Effective End Date
123 01-JAN-2003 00:00:00 07-APR-2003 00:00:00
123 08-APR-2003 00:00:00 31-DEC-4712 00:00:00

On the face of it things aren't any different. But look at the effective end date/time of the old record and compare it with the effective start date/time of the new record. There is in fact a 'gap' here of 24 hours! Because the code was using 'sysdate' to get the current assignment row it was in effect treating date track dates as date/time values and for these poor unfortunates was indeed 'falling down the gap'.

Moral of the story: Be like the elephant - use your trunc()!! (Cue loud groans shaking of heads leaping from nearest window etc)

OK how about: Using trunc(sysdate) in the above query would cure the problem instantly

Hope this helps somebody

Cheers

Janet & John

Top
#1125 - 28/07/05 08:38 AM Re: Janet & John do Date-track Queries
jhatten Offline
hacker

Registered: 15/03/05
Posts: 95
Loc: London
CT . .You can now consider this a worthwhile exercise - I have blatantly plagiarised this post to explain to our OTL Dev friends in the states the concept of DateTrack… they are still thinking about it. . .Jay

Top
#1126 - 08/08/05 10:53 PM Re: Janet & John do Date-track Queries
CT Offline
veteran
***

Registered: 11/03/05
Posts: 816
Loc: Back at Fort Apache, Gosport!
Ah let the royalty cheques commence.... KER CHIIIIINGG
_________________________
L&K
CT

Top
#1127 - 10/08/05 04:57 PM Re: Janet & John do Date-track Queries
bcooper Offline
veteran
*****

Registered: 11/03/05
Posts: 944
Loc: Earth, Europe, England, here
<cough>sponsorship</cough>
_________________________
I'm blogging again - albeit sporadically
Also my random musings courtesy of Twitter

Top
#1128 - 11/08/05 09:27 AM Re: Janet & John do Date-track Queries
CT Offline
veteran
***

Registered: 11/03/05
Posts: 816
Loc: Back at Fort Apache, Gosport!
How far are you walking and which charity is it for?
_________________________
L&K
CT

Top
#1129 - 22/08/06 01:10 PM Re: Janet & John do Date-track Queries [Re: CT]
jemson Offline
regular

Registered: 16/04/05
Posts: 25
Loc: New York City
Ahh Clive

You have no idea how much I miss you correcting my pathetic attempts at SQL!!! Can I bribe you with imports of US goods??!!!
_________________________
Joules

Top
#1130 - 23/08/06 05:29 PM Re: Janet & John do Date-track Queries [Re: jemson]
CT Offline
veteran
***

Registered: 11/03/05
Posts: 816
Loc: Back at Fort Apache, Gosport!
Hello Joules, how the devil are you? I can't believe they haven't cottoned-on to you and removed all traces of SQL access from your PC...
_________________________
L&K
CT

Top


Moderator:  CT 
Oracle R12.1.1 on your existing computer
Get up and running with Oracle on your existing computer in 5 minutes

Get up and running with Oracle on your existing computer in 5 minutes!

Alard Consulting Ltd are pleased to offer Oracle R12.1.1 on your existing computer.

Connect to Oracle R12 from your computer to do client demonstrations, your own development work, or test functional setup on a Vision environment without having to install and maintain Oracle.

Backup your work before making changes in case things go wrong. Just copy the files to a new directory before making the changes. If it doesn't work, copy the files back again, all from Windows. No other skills needed.

As everything is contained on a single external hard drive, you can take it with you to use wherever you need it.

For each sale from HCMAces a portion of the price will go to the running costs of this forum.

For more information see www.alard.net/products.html.

Forum Stats
492 Members
48 Forums
1207 Topics
5710 Posts

Max Online: 51 @ 12/08/10 02:30 AM
Today's Birthdays
No Birthdays
Recent vacancies
Top Posters
bcooper 944
CT 816
Geoff Dixon 354
delboy 291
SBi 288
vkumar 223
kp_rapolu 208
cbrookes 197
Gavin Harris 111
jmoyano 96
September
Su M Tu W Th F Sa
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30