Re: Is this possible with SQL in SQL PLUS?
Date: Thu, 30 Aug 2001 21:59:51 +0100
Message-ID: <9mnld9$l1h$1_at_phys-ma.sol.co.uk>
Johan
Your description of your table is not very clear. Has your table got 124 fields? One for each temparature, the date for each and an indicator of whether its left or right?
In any case I think you data structure is not correct, you ned to normalise your table such that you have the fields
DATE Timestamp POSITION Left or Right TEMPARATURE The temparature recoderd
This structure gives you the flexibility of extending the number of positions (Left & Right) without changing the table structure
OR
If there will never be a new position likeCentre or something like that then
this structure is better and faster to manipulate
DATE
TEMPR
TEMPL
Hope that helps
lawrence
"johan" <johan.volders_at_village.uunet.be> wrote in message
news:3b8d9de3$0$7114$4d4efb8e_at_news.be.uu.net...
> Every 5 minutes i want to save temperatures of a furnace in an Oracle
table.
> The furnace = 60 meters long and every meter there is a registration of 2
> temperatures (left side and right side).
>
> So i store every five minutes 2 records in a table with fields
> date, L (= left side of furnace), temp1, temp2, .........., temp60
> date, R (=right side of furnace), temp1, temp2, ........, temp60
>
> When the user enters a date,time i want to show fields of the two records
> from that date,time in following format :
> left temp1 right temp1
> left temp2 right temp2
> .... .....
> left temp60 right temp60
>
> Is this possible with a simple query from sql plus or does one have to
> program in PL/SQL to accomplish this?
>
> Friendly regards
> Johan
>
>
Received on Thu Aug 30 2001 - 22:59:51 CEST
