Archive for the ‘Algorithms’ Category.
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’ »
Rounding Error
Some people use the term “rounding error” to indicate that an answer is right enough, although not perfectly right. Those people think “accurate” and “precise” are two different concepts. They may be experimental scientists or programmers, but they aren’t working in Accounting. Accountants cannot and should not leave journal entries alone with rounding errors.
Continue reading ‘Rounding Error’ »
The Rewrite And The Bug Fix
Last week I worked on two SQR program bugs. I rewrote the first one from scratch. I wanted to rewrite the second one but didn’t. Here is why.
Continue reading ‘The Rewrite And The Bug Fix’ »
Dynamic Views in Application Designer
Views are a useful feature of SQL databases, letting us create virtual tables based on SQL select statements. The Peoplesoft Application Designer also lets us create dynamic views, which we may use within the page processor.
Continue reading ‘Dynamic Views in Application Designer’ »
Evaluate Two Values At Once In SQR
Last year I wrote about the similarity and superiority of the SQR evaluate command compared to the C or Java switch command in SQR Evaluate Versus C/Java Switch, part 1 and part 2. Here is another way to extend evaluate functionality.
Continue reading ‘Evaluate Two Values At Once In SQR’ »
How To Write Spreadsheets From SQR
SQR and the Peoplesoft Process Scheduler work together to allow users to choose output format. The favorites in my organization are document (PDF) and spreadsheet (XLS). I mentioned this in 4 SQR Resolutions and I’ve had three readers ask me to elaborate. For this blog, that’s a tsunami of feedback.
Continue reading ‘How To Write Spreadsheets From SQR’ »
SQR Functions
The SQR language has several families of built-in functions. They range from minor conveniences to potential life savers. There are some surprising inclusions and surprising omissions. I discuss some of the functions I wish we had in An SQR Wish List.
Continue reading ‘SQR Functions’ »
Reporting Changes In Peoplesoft With SQR, Part 2
Last week, we considered change reporting based on the effective dates and action dates of PS_JOB. Other Peoplesoft tables track history differently. We need other approaches to report those changes.
Continue reading ‘Reporting Changes In Peoplesoft With SQR, Part 2’ »
Reporting Changes In Peoplesoft With SQR, Part 1
Most of my report and interface programs output snapshots of the database. Reports and interfaces about how the data has changed are more challenging. The effective date model of many Peoplesoft tables suggest that we can easily extract the history of data, but the difference between effective dates and action dates, and the availability of correction mode complicate the issue.
Continue reading ‘Reporting Changes In Peoplesoft With SQR, Part 1’ »
Table Driven SQR
Table-Driven programming is a technique that can make a program more easy to write or less easy to write, more clear or less clear, more maintainable or less maintainable. It can improve a program when we use it appropriately.
Continue reading ‘Table Driven SQR’ »