select count((case when
(nvl(emission_freq, 0) != 0 and nvl(reception_freq, 0) != 0)
then 1 else null end)) * 2 +
count((case when (nvl(emission_freq, 0) != 0 and nvl(reception_freq, 0) != 0)
then null else 1 end)) * 1 as "total"from am39
where station = '';
rgds
amar
SELECT
STATION,EMISSION_FREQ,RECEPTION_FREQ,DECODE(SUBSTR(NVL(TO_CHAR(RECEPTION_FREQ),'NONE'),1,1),'N',EMISSION_FREQ*1,EMISSION_FREQ*2)
VALUEFROM TEST;
STATION EMISSION_FREQ
RECEPTION_FREQ
VALUE--
-
--
-STAT1
192.5
193.5
385STAT2
192.5
you could achieve this using decode
cozI am anoviceOracle Certifiable DBBS
- Original Message -
From:
ALEMU Abiy
To: Multiple recipients of list ORACLE-L
Sent: Monday, July 02, 2001 1:00 PM
Subject: Simple SQL Query Question
I've a table with
the following
I'm
using Oracle 7.3.4, so is it possible to use CASE statements
?
-Message d'origine-De: Amar Kumar Padhi
[mailto:[EMAIL PROTECTED]]Envoyé: lundi 2 juillet 2001
10:57À: Multiple recipients of list
ORACLE-LObjet: RE: Simple SQL Query
Question
select count((case
-Message d'origine-De: novicedba
[mailto:[EMAIL PROTECTED]]Envoyé: lundi 2 juillet 2001
11:15À: Multiple recipients of list
ORACLE-LObjet: Re: Simple SQL Query
Question
SELECT
STATION,EMISSION_FREQ,RECEPTION_FREQ,DECODE(SUBSTR(NVL(TO_CHAR(RECEPTION_FREQ),'NONE'),1,1),'N
, so is it possible to use CASE statements ?
-Message d'origine-
De : Amar Kumar Padhi [mailto:[EMAIL PROTECTED]]
Envoyé : lundi 2 juillet 2001 10:57
À : Multiple recipients of list ORACLE-L
Objet : RE: Simple SQL Query Question
select count((case when (nvl(emission_freq, 0) != 0 and nvl
2001
13:20À: Multiple recipients of list
ORACLE-LObjet: RE: Simple SQL Query
Question
Well, then decode would be the only option, as suggested by other
members. Case is not supported.
rgds
amar
-Original Message-From: ALEMU Abiy
[mailto:[EMAIL PROTECTED]]Sent
Message -
From:
ALEMU Abiy
To: Multiple recipients of list ORACLE-L
Sent: Monday, July 02, 2001 3:30 PM
Subject: RE: Simple SQL Query
Question
For
example for a table like this one,
STATION
EMISSION_FREQ
RECEPTION_FREQ
Thank you Harsh, your query seems working
-Message d'origine-
De : Harsh Agrawal [mailto:[EMAIL PROTECTED]]
Envoyé : lundi 2 juillet 2001 14:05
À : Multiple recipients of list ORACLE-L
Objet : RE: Simple SQL Query Question
Hi ALEMU Abiy,
Try out this :
select count(*)*2 FREQC
from
Your
query also seems working, not anovice's solution :--)
Thank
you
-Message d'origine-De: novicedba
[mailto:[EMAIL PROTECTED]]Envoyé: lundi 2 juillet 2001
14:05À: Multiple recipients of list
ORACLE-LObjet: Re: Simple SQL Query
Question
select decode(emm_freq,0,1
10 matches
Mail list logo