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 or PL/SQL

Re: SQL or PL/SQL

From: Vigi98 <hubera_at_caramail.com>
Date: Wed, 08 Dec 1999 18:32:20 GMT
Message-ID: <Uux34.1211$ko1.7515156@nnrp1.proxad.net>


Harder and harder !

My alarms come from several network equipment (you are going to know all the project I'm working on!). I would like to obtain the same result as before but split, for each semi-day, in four parts : alarms from equipment whose names are like '%-co-%', alarms from equipment whose names are like '%-pe-%', alarms from equipment whose names are like '%-ce-%' and alarms from equipment whose names are like '%-ds-%'.

Thus I would obtain a result with the following fields : date of the first part of the 12h period ; flag to indicate if the hour of the alarm is between 6AM and 6PM or not ; number of alarms of severity 1 for co equipments; number of alarms of severity 2 for co equipments; number of alarms of severity 3 for co equipments; number of alarms of severity 1 for pe equipments; number of alarms of severity 2 for pe equipments; number of alarms of severity 3 for pe equipments; number of alarms of severity 1 for ce equipments; number of alarms of severity 2 for ce equipments; number of alarms of severity 3 for ce equipments; number of alarms of severity 1 for ds equipments; number of alarms of severity 2 for ds equipments; number of alarms of severity 3 for ds equipments;

If someone has enough courage to find a solution...

Thanks in advance.

vigi98_at_my-deja.com a écrit dans le message <825mku$37j$1_at_nnrp1.deja.com>...
>Hi all,
>
>I'm not very good at doing SQL requests or PL/SQL scripts. Could you
>solve the following problem :
>
>I've got three fields in a table : alarm_id,date-hour and severity.
>Severity is an integer between 1 and 3.
>
>What I would like to obtain is what follows : for each period of 12h
>(from 6AM to 6PM, then from 6PM to 6AM) I would have the number of
>alarms per severity number.
>
>Typically, it would give a table with the following fields :
>
>date of the first part of the 12h period ; flag to indicate if the hour
>of the alarm is between 6AM and 6PM or not ; number of alarms of
>severity 1 ; number of alarms of severity 2 ; number of alarms of
>severity 3
>
>
>Thank you very much for your answers
>
>
>Sent via Deja.com http://www.deja.com/
>Before you buy.
Received on Wed Dec 08 1999 - 12:32:20 CST

Original text of this message

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