SQL for Breaks in a Sequence

In a previous post, Views You Can Use: Ordinal Numbers, we discussed how to acknowledge children who visited Pee Wee Bees most often.  The little boy who had been here the most (88 times to date) should be in first place.  The little girl who has visited 83 times should be in second place.  It’s easy to count each child’s number of visits; harder to assign ordinal numbers (first, second, third) and recognize ties (two siblings have been here 79 times).

I also have a “Hot Streaks” list that shows the children who have visited Pee Wee Bees at least once per calendar month for at least the past three calendar months.  This was a more challenging query.  A child who visits once in January, once in February, and once in each following month throughout 2012, would have a streak of twelve consecutive months.  A child who visited ten times in September, ten times in October, not once in November, and ten times in December would have a “streak” of one month.

Continue reading ‘SQL for Breaks in a Sequence’ »

13 Peoplesoft Resolutions for 2013

Happy New Year! I resolved to take out the garbage for pickup on January 2. Mission accomplished. Now that you have quit smoking and lost weight, it’s time to work on some real challenges for professional self-improvement.

Here are 13 Peoplesoft professional resolutions for 2013. Pick a few and get started now, or save them for your next performance review when your manager wants to set goals for the coming year. (I have done all of these over the course of my PeopleSoft career, so I’m setting my sights for the January 9 garbage pickup.)
Continue reading ‘13 Peoplesoft Resolutions for 2013’ »

Views You Can Use: Ordinal Numbers

Cardinals and Ordinals

As a child, I learned about cardinal and ordinal numbers. I just checked Wikipedia and found that my understanding of them is … childlike. I remember cardinal numbers as non-negative integers; 0, 1, 2, 3, and so on. I remember ordinal numbers as first, second, third, and so on.

The difference is as follows. Suppose we have ten numbers listed from smallest to largest; 2, 3, 5, 7, 11, 13, 17, 19, 23, 29. (Can you guess how I chose them?) The first number is 2. The second number is 3. The ninth number is 23.

Continue reading ‘Views You Can Use: Ordinal Numbers’ »

Date Arithmetic Breaks the Laws Of Arithmetic

One of our readers, John, recently posted a question on the SQR Dates blog entry:

“I need to subtract from date in the format years, months, days. For example, I want to subtract 5 years, 2 months and 3 days from the current date.  How can this be done in SQR?”
Continue reading ‘Date Arithmetic Breaks the Laws Of Arithmetic’ »

The Bug in Every Peoplesoft SQR Program

I shouldn’t claim that this bug appears in every SQR program written for the Peoplesoft environment.  It’s not even in every SQR program that takes run control parameters.  But I bet it is in most of them.

Continue reading ‘The Bug in Every Peoplesoft SQR Program’ »

Another Special Announcement

Please come back on Tuesday, October 18, 2011 for an exciting announcement.

Continue reading ‘Another Special Announcement’ »

A Special Announcement

Please come back on Tuesday, April 6, 2010 for an exciting announcement.
Continue reading ‘A Special Announcement’ »

From Process To Peoplesoft Page

Last week we discussed finding the best Peoplesoft page, and the menu path to that page, for viewing and updating a particular database table.  We have a similar need to find the menu path to the run control page for a particular batch process.
Continue reading ‘From Process To Peoplesoft Page’ »

From Database Table To Peoplesoft Page

When I discuss data with my colleagues in the Human Resources and Payroll departments, we speak different languages.  I talk about tables and columns.  They talk about menus, tabs, and pages.  “You need to change EEO4CODE in PS_JOBCODE_TBL,”  I’ll say.  They’ll reply, “You mean, select Setup HRMS, Foundation Tables, Job Attributes, Job Code Table, and the Job Code Profile tab?”  There are pages I’ve never visited and they’ve never used a SQL browser.
Continue reading ‘From Database Table To Peoplesoft Page’ »


PS_EMPLOYMENT used to be a SQL table.  Now it is a SQL view that joins PS_PER_ORG_ASGN, PS_PER_ORG_INST, and PS_JOB.  Of course, PS_JOB has two subselects to pick a single value of EFFDT and EFFSEQ for each value of EMPL_RCD.  The subselect for EFFDT is unusual and it may not behave the way the designers intended.

Continue reading ‘PS_EMPLOYMENT Bug Report’ »