Re: ORACLE Puzzle II
From: Mr. Matteo diTommaso <ditommm_at_aa.wl.com>
Date: 21 Sep 93 08:41:40 -0400
Message-ID: <1993Sep21.084140.1_at_aa.wl.com>
CHALLENGE_NUM NUMBER
RATING CHAR
PART_NUMBER CHAR TABLE Time_Points
Date: 21 Sep 93 08:41:40 -0400
Message-ID: <1993Sep21.084140.1_at_aa.wl.com>
I have data stored in the following format
TABLE Challenge
CHALLENGE_NUM NUMBER
RATING CHAR
PART_NUMBER CHAR TABLE Time_Points
Challenge NUMBER Time DATE Fail_Num Number Tested_Num Number
I would like to generate the following report:
Failures _at_ Given Time --------------------------------------- PRESSURE RATING PART_NUMBER 0:15 0:30 0:45 1:30 1:00 2:00 4:00 8:00 -------- ------ -------------- ---- ---- ---- ---- ---- ---- ---- ---- 2000.00 TP P456-D34 1/8 4/8 2/8 3/8 2/8 4/8 4/8 300.00 TP P512-F45 2/8 4/8 6/8 4/8 5/8 4/8 3/8 300.00 TP F614-D44 1/8 5/8 6/8 6/8 4/8 6/8 3/8
Times are variable but limited to 0:15 increments.
Is my table design resonable?
Is there a better table design? What and Why?
Is there any way to dgenerate this report (just SQL or PL/SQL) without creating views which hard code the values of TIME? I have done this now using max(DECODE()). This view is undesireable since I have a large amount of data and doing
max(DECODE(Time,'0:15',Fail_Num,null)) "0:15" prevents me from using the indexes on Time_Points(Tested_Num) to search.
Any advice would be gratly appreciated.
--Received on Tue Sep 21 1993 - 14:41:40 CEST
| Matteo diTommaso (ditommm_at_aa.wl.com) | |
| Ann Arbor, MI, USA | This space for rent. |
| Phone: (313) 996-7148 | |
| (Request full disclaimer via e-mail) | |