Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: SQL Problem

Re: SQL Problem

From: D R Patterson <patterd1_at_home.com>
Date: Tue, 02 Oct 2001 09:21:02 GMT
Message-ID: <3BB98670.82EA1C47@home.com>


Niall,

> Do any of the guys who teach sql etc on this list ever ask the bright sparks
> to solve the given problem in two or more different ways, and to compare and
> contrast each approach.

I'm a long-time programmer part way through the Oracle education. In the good classes I've had, they are just happy if people can solve a problem one way. I thought about doing this as a big subquery, and think it could be done that way, but I figured it would be much worse performance to have to find the rows for a person multiple times and compare each to each. With the approach I took, by ordering the inner cursor, you only have to look at each row once.

I took a class last spring (Advanced Progamming) where we did a lot of subqueries, and PL/SQL. That is how I was able to solve this. I mulled it around a bit but it only took about an hour once I sat at the keyboard. One case this code will highlight is where the person changed stores in the mddle of a period. They will show up with an ending job at one store in a period and a beginning of another job at a different store for the same period.

The manual effort to figure out what is to be done will be tricky, but that is true no matter what method was used to highlight the people with questionble data.

Dave Patterson Received on Tue Oct 02 2001 - 04:21:02 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US