× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Jim,

I believe his report table has a data bug right now. It should have two records with '2011-00-00' as the character key so he's adding in current year sales (+1) and subtracting last year sales (-1) when the '2011-00-00' key is passed in to the procedure. Right now I see '2011-00-00' and '2010-00-00' as keys on two records. Other possible report years should also have two records. They've been correcting the article after it was published so this might be corrected by now.

I once had a great math teacher back in high school (RIP Mister Doran). He could never work out the answer to a problem right. It got us students to show him where he went wrong on the calculation which really made us learn the problem. Back then I thought he was just error prone but maybe it was intentional.

One reason I enjoy this list and Joe Celko - I'm always learning.

Paul Morgan

Principal Programmer Analyst
IT Supply Chain/Replenishment


-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of James Horn
Sent: Monday, August 29, 2011 12:41 PM
To: midrange-l@xxxxxxxxxxxx
Subject: RE: Article by Joe Celko - Mimicking magnetic tape in SQL - A

I tried it. Unfortunately couldn't understand the need for all the
"original" code. Can someone who is better at SQL than me look at the
original code and the replacement code and say they are doing the same
thing? When I ran the replacement code in strsql this was the result.

REPORT_PERIOD STORE_ID SALES_AMT_TOT
2011-00-00 1
43.50
2011-00-00 2
44.25

Is this what the original would have done?

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.