Re: Is this possible with SQL in SQL PLUS?

From: Pierre Charpenay <pierre.charpenay_at_unilog.fr>
Date: Thu, 30 Aug 2001 13:10:08 +0200
Message-ID: <3B8E1F10.1FB8A1AA_at_unilog.fr>


You can try something like that :

select

     L.temp1 || ' ' || R.temp1 || '
' || L.temp2 || ' ' || R.temp2 || '
...
' || L.temp60 || ' ' || R.temp60
from TABLE_TEMP L, TABLE_TEMP R
where L.the_date = R.the_date
 and L.the_date = to_date( ...)

Each line of the select part must end (except the last) and start (except the first) with a quote (so the carriage return and/or new line is included in the single column definition). This works with SQL*Plus on Unix.

Hope this helps.

johan a écrit :
>
> ...
> 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

-- 
 Pierre CHARPENAY
Received on Thu Aug 30 2001 - 13:10:08 CEST

Original text of this message